Language Support
The Page Builder offers robust multilingual support, enabling you to reach a global audience with ease. By default, it supports the following languages, chosen for their widespread use and strong developer communities:
| Language | Code |
|---|---|
| English | en |
| Chinese (Simplified) | zh-Hans |
| French | fr |
| Japanese | ja |
| Russian | ru |
| Spanish | es |
| Portuguese (Brazil) | pt |
| German | de |
| Arabic | ar |
| Hindi | hi |
| Danish | da |
| Italian | it |
Default language
You can set a default language for your project:
const configPageBuilder = {
userSettings: {
language: {
default: 'en',
enable: ['en', 'zh-Hans', 'fr'],
},
autoSave: true,
},
}If you prefer to offer only a subset of these languages for users to switch between, specify them using the enable option.
If you do not provide the enable array, the Page Builder will default to showing all supported languages by default.
const configPageBuilder = {
userSettings: {
language: {
default: 'en',
enable: ['en', 'zh-Hans', 'fr'],
},
autoSave: true,
},
}Disabling the Language Dropdown
If you want to completely hide the language selector from the UI (e.g., when only one language is available or you want a fixed language), simply set disableLanguageDropdown to true.
Even when the dropdown is disabled, the default language will still be applied automatically. This gives you full control over localization while keeping the interface simple for your users.
const configPageBuilder = {
userSettings: {
language: {
default: 'en',
enable: ['en', 'zh-Hans', 'fr'],
},
autoSave: true,
},
}This flexibility allows you to tailor the language experience to your audience’s needs.
Component Label Translations
All helper and layout component titles shown in the component picker are localized using the locale files in src/locales.
When adding new component titles (for example helper blocks like Quote and Simple List), add the same key to every locale file so users do not see fallback English labels in non-English interfaces.