The locale attribute lets a developer choose a language UI translation from one of the 33 available languages by specifying its locale string.
By default, the editor language is automatically set according to the client browser's language. The locale property allows the developer to specify an editor UI translation directly, overriding the browser's default language.
Multiple Locales
Using more than one unique value for editor locale on a page is not currently supported. This includes configuring one editor to use the browser default and another to use a specific value via this API.
Example Configuration
In this example, a simple configuration
object is created that defines the locale for the editor UI for the editor
created by
replace
.
var config = { ui : { locale : 'fr' //sets the editor language to french } }; var editor = textboxio.replace('#targetId', config);
Properties
Property | Type | Properties |
---|---|---|
locale | String | locale short code: e.g en for English |
Supported Locales
Language | Locale String |
---|---|
Arabic | ar |
Catalan | ca |
Chinese (Simplified) | zh |
Chinese (Traditional) | zh_tw |
Croatian | hr |
Czech | cs |
Danish | da |
Dutch | nl |
English | en |
Farsi | fa |
Finnish | fi |
French (Europe) | fr |
German | de |
Greek | el |
Hebrew | he |
Hungarian | hu |
Italian | it |
Japanese | ja |
Kazakh | kk |
Korean | ko |
Norwegian | no |
Polish | pl |
Portuguese (Brazil) | pt_br |
Portuguese (Europe) | pt_pt |
Romanian | ro |
Russian | ru |
Slovak | sk |
Slovenian | sl |
Spanish | es |
Swedish | sv |
Turkish | tr |
Thai | th |
Ukrainian | uk |