Localization
Set locale when initializing the editor to change the language of its user
interface. The default is en-US.
unlayer.init({
locale: 'fr-FR',
});
The editor first looks for the full locale, then falls back to its base
language. For example, fr-CA can use Canadian French overrides and then
French defaults.
The translation reference on this page lists the languages and keys shipped with the Editor version selected in the docs.
Built-in Editor locales
The Editor ships with these locale codes: ar, ca, cs, da, de, en,
en-CA, es, et, fa, fi, fr, fr-CA, hu, id, it, ja,
ko-KR, nl, no, pl, pt-BR, pt-PT, ru, sv, tr, uk,
vi-VN, zh-CN, and zh-TW. The translation reference below remains the
source of truth for the selected docs version.
Built-in Image Editor locales
The Image Editor ships with these locale codes: de, en, es, fr, it,
ja, ko, nl, pt, and zh. Select Image Editor in the translation
reference below to browse its keys.
Override translations
Pass only the keys you want to change under the matching locale:
unlayer.init({
locale: 'fr-FR',
translations: {
'fr-FR': {
'tools.tabs.content': 'Contenu',
'tools.tabs.row': 'Lignes',
},
},
});
Add a custom language
You can also supply every required key for a locale that is not built in:
unlayer.init({
locale: 'xx',
translations: {
xx: {
'tools.tabs.content': 'Content',
'tools.tabs.row': 'Rows',
// ...
},
},
});
Use English in the translation reference below as the complete key list, then provide values for your locale. Missing keys fall back to the editor's default messages.
Translation reference
Browse the exact translation keys shipped with the Editor version selected in the docs menu. Choose a product and language, search by key or text, or copy the full locale or filtered results as JSON.
The latest reference reads directly from the product translation files.
Released docs use an immutable snapshot from that Editor version, so their keys
do not change later. Copied JSON has the shape expected by the translations
option in unlayer.init().
| Key | Translation |
|---|