setLocale

sets the locale in use

void setLocale(string name);

Parameters

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.

Webix Pro edition includes over 300 locales to match a great variety of cultures.

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

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

setLocal 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 a new locale settings.

See also
Back to top