Skip to content

Internationalization

The editor interface ships translated into 21 languages. One option picks the language, and individual strings can be replaced where your product uses different terminology.

Define the language

When initializing the Topol Plugin, add the language code in the TOPOL_OPTIONS configuration object.

ts
const TOPOL_OPTIONS = {
  id: "#app",
  authorize: {
    apiKey: "YOUR_API_KEY",
    userId: "YOUR_USER_ID",
  },
  language: "fr", // Example: French
};

Languages use ISO 639-1 standard.

WARNING

Only the two-letter codes below are recognized. Region variants such as pt-BR or zh-CN are not accepted, so pt covers both European and Brazilian Portuguese and zh is Simplified Chinese. An unrecognized code falls back to English one string at a time and logs warnings to the console, rather than failing outright.

List of all currently supported languages

CountryLanguageCode
United States Of America flag United Kingdom flagEnglishen
France flagFrenchfr
Brazil flag Portugal flagPortuguesept
Spain flagSpanishes
Japan flagJapaneseja
China flagChinesezh
Russia flagRussianru
Turkey flagTurkishtr
Germany flagGermande
Sweden flagSwedishsv
Netherlands flagDutchnl
Italy flagItalianit
Finland flagFinnishfi
Romania flagRomanianro
Czech Republic flagCzechcs
Slovaksk
Poland flagPolishpl
South Korea flagKoreanko
Vietnam flagVietnamesevi
Israel flagHebrewhe
Arabicar

Feel free to contact us if you need to add another language or find an incorrect translation.

Changing the language after initialization

The language is not fixed at startup. Passing a new one to updateOptions reloads the interface strings in place:

js
window.TopolPlugin.updateOptions({ language: "de" });

INFO

This changes the language of the editor interface. Translating the template's own content is a separate feature, covered in Multilingual Templates.

Right-to-left languages

Arabic and Hebrew are translated, and new text blocks in those languages are created with right-to-left content. The editor interface itself stays left-to-right, since panels and toolbars are not mirrored.

Renaming individual labels

Single strings can be replaced without changing the language, which suits products whose own terminology differs from the editor's. The textOverride option covers this and is documented in Custom UI Labels. Overrides apply to whichever language is active, so a plugin offering several languages needs a set per language.


Flags made by Freepik from www.flaticon.com