Documentation

setLocale

sets the locale in use

void setLocale(string name);

Parameters

namestringthe locale name

See also

Example

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

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("en-US");

But the method is not enough for switching locales dynamically. After setting another locale, you need to recreate the view (see the related sample).

Back to top