Skip to main content
Version: latest

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, you need to create a custom Widget Constructor for each of them and recreate the widget every time users switch the language.

Unsupported locale

If an unsupported locale is specified in the Widget Constructor, the chart falls back to English with a console warning locale isn't supported.

Custom translations

If you want to provide custom translations for UI strings, use the custom_translate_function property of the Widget Constructor. Check out the Widget Constructor tutorial on YouTube for an implementation example.

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.