setLocale

sets the locale in use

void setLocale(string name);
namestringthe locale name

Example

webix.i18n.setLocale("en-US")

Related samples

Details

The method can take only one of a predefined set of values (locale names):

  • "en-US" - North American (used by default);
  • "ru-RU" - Russian;
  • "fr-FR" - French;
  • "ja-JP" - Japanese;
  • "be-BY" - Belarusian;
  • "de-DE" - German;
  • "es-ES" - Spanish;
  • "it-IT" - Italian;
  • "zh-CN" - Chinese;
  • "pt-BR" - Portuguese (Brazil).

Webix Pro edition includes over 300 locales.

The method can be used to apply the changes done to the locale in use.

webix.i18n.parseFormat = "%d-%m-%Y";
webix.i18n.setLocale();

setLocale() must be used before rendering the UI widgets. Calling setLocale() after widgets are rendered will not force locale update in the already rendered UI. You will need to recreate views to apply new locale settings.

See also
Back to top