Check documentation for the latest version of dhtmlxSuite Localizing ColorPicker DHTMLX Docs

Localizing ColorPicker

dhtmlxColorPicker allows its users to add and use different languages with the ability to switch between them dynamically.
Firstly, the user needs to define necessary language settings with script (if no language pack is provided with the color picker package). This can be done in the following way:

dhtmlXColorPicker.prototype.i18n["ru"] = {
      labelHue : "Отт",
      labelSat : "Нас",
      labelLum : "Ярк",
      labelRed : "Крас",
      labelGreen : "Зел",
      labelBlue : "Син",
      btnAddColor : "Добавить к выбранным",
      btnSelect : "Выбрать",
      btnCancel : "Отмена"
}

When you have necessary language settings, you can switch between them using loadUserLanguage() method indicating the id of the language you used for its definition:

myColorPicker.loadUserLanguage("ru");
Back to top