Skip to main content

Localization

Set up language

To set up a default language, specify the locale property in the Widget Constructor. Check out the Widget Constructor tutorial on YouTube for an implementation example.

Supported languages

The languages that the library supports are listed below.

Languagelocale value
Arabicar
Catalan (Spain)ca_ES
Chinese (Taiwan)zh_TW
Chinesezh
Englishen
Frenchfr
German (Germany)de
Hebrew (Israel)he_IL
Indonesian (Indonesia)id_ID
Italianit
Japaneseja
Koreanko
Malay (Malaysia)ms_MY
Polishpl
Portuguesept
Russianru
Spanishes
Swedishsv
Thai (Thailand)th
Turkishtr
Vietnamesevi

Multiple languages

To support several languages, create a custom Widget Constructor for each of them and recreate the widget every time users switch the language.

Unsupported languages

The library only supports the predefined languages listed in the table above. It is not possible to add support for a completely new language or a custom locale that is not already included in the library.

If you specify an unsupported locale in the Widget Constructor, the chart falls back to English and logs a console warning: locale isn't supported.

Custom translations

If you want to provide custom translations for specific UI strings, use the custom_translate_function property of the Widget Constructor. Note that a list of all internal UI strings cannot be provided.

Right-to-left alignment

The library supports right-to-left (RTL) alignment for RTL languages such as Arabic and Hebrew. Note that the alignment affects only toolbars, dialogs, and other UI elements except the chart.