Skip to main content
Lumen Editor ships with a locale option that controls the tooltip labels shown on every toolbar button. Out of the box you get English and Turkish, but the same system accepts a plain JavaScript object so you can support any language without waiting for an official bundle. Localization is purely label-level — it does not affect the editor’s output HTML.

Built-in locales

Set the locale option to one of the built-in locale strings at initialization time. Lumen Editor currently ships two locales:
If the locale option is omitted entirely, the editor falls back to 'en'.

Custom locale

Pass a plain object instead of a string to supply labels for any language. Each key corresponds to a toolbar command name and its value is the tooltip string displayed on hover:
Any key you omit falls back to the built-in English label, so you only need to supply the keys relevant to the toolbar buttons you’ve configured.
If you build a high-quality locale object for a language not yet included in Lumen Editor, consider opening a pull request to add it as a built-in. Community-contributed locales benefit every user of the library.

Partial overrides

You don’t need to translate every key. Supplying a partial object merges your values on top of the default English locale, leaving untouched keys as-is. This is useful when you only want to rename a handful of labels — for example, to match your product’s terminology:
When you pass a plain object as the locale option, the editor merges your keys on top of the built-in English labels. Any key you omit continues to display its default English label, so you only need to supply the entries you want to change.