Skip to main content

Localization

You can apply different languages to the interface of DHTMLX Combo. You just need to translate the corresponding strings for Combobox labels and apply a ready locale to the component.

Related sample: Combobox. Localization

Default locale

The default locale for Combobox looks like this:

const en = {
notFound: "Not found",
selectAll: "Select all",
unselectAll: "Unselect all",
selectedItems: "Selected items",
createItem: "Create",
placeholder: "Click to select"
};

Custom locale

To use a different locale, your need to:

  • define necessary language settings - names of buttons and labels:
const de = {
notFound: "Nicht gefunden",
selectAll: "Alle auswählen",
unselectAll: "Deaktivieren Sie Alle",
selectedItems: "Ausgewählte Elemente",
createItem: "Schaffen",
placeholder: "Klicken um auszuwählen"
};
  • apply the language settings by calling the dhx.i18n.setLocale() method before Combobox initialization:
dhx.i18n.setLocale("combo_container", de);
const combo = new dhx.Combobox("combo_container");