Skip to main content

Locale for Test Data

Beeceptor supports localization when generating test data in the mock responses. You can set a preferred locale for an endpoint and Beeceptor will use that locale to produce names, addresses, phone numbers, dates, and other synthetic test data. This helps you generate realistic API responses that match a target region, language, or country for your a great demo or showcase.

Configuring Locale

You can configure the locale from the Settings page of your endpoint.

test-data-in-Chineese-Spanish-Portuguese-Indonesian-languages

Once saved, Beeceptor applies the selected locale to all test data helpers inside your templates. You can update this setting anytime. When the locale is changed, all new requests begin using region-specific data instantly.

Localization Example

Below is asample templates and corrosponding response when Chinese (China) is selected. You can replace them with your actual response structures.

Template

{
"firstName": "{{faker 'name.firstName'}}",
"lastName": "{{faker 'name.lastName'}}",
"fullName": "{{faker 'name.fullName'}}",
"street": "{{faker 'address.streetAddress'}}",
"city": "{{faker 'address.city'}}",
"state": "{{faker 'address.state'}}",
"companyName": "{{faker 'company.name'}}"
}

Beeceptor Response

{
"firstName": "浩宇",
"lastName": "翠",
"fullName": "蓬雨涵",
"street": "赖侬1号",
"city": "吉安市",
"state": "西藏自治区",
"companyName": "厦原市建辉水产集团有限公司"
}

Supported Locales

The following locales are currently supported in Beeceptor and can be selected from the Settings page. If you need a locale that is not listed below, please contact the support team to check if it can be added.

Locale CodeDisplay Name
zh_CNChinese (China)
enEnglish (default)
en_GBEnglish (Great Britain)
en_INEnglish (India)
en_USEnglish (United States)
frFrench
id_IDIndonesian (Indonesia)
jaJapanese
pt_BRPortuguese (Brazil)
esSpanish
es_MXSpanish (Mexico)