Localization
You can apply different languages to the DHTMLX Combobox interface. Translate the label strings and apply the resulting locale to the component.
Related sample: Combobox. Localization
Default locale
Combobox uses the following default locale:
const en = {
notFound: "Not found",
selectAll: "Select all",
unselectAll: "Unselect all",
selectedItems: "Selected items",
createItem: "Create",
placeholder: "Click to select"
};
Custom locale
Follow these steps to use a different locale:
- Define the language settings—button and label names:
const de = {
notFound: "Nicht gefunden",
selectAll: "Alle auswählen",
unselectAll: "Deaktivieren Sie Alle",
selectedItems: "Ausgewählte Elemente",
createItem: "Schaffen",
placeholder: "Klicken um auszuwählen"
};
- Call the
dhx.i18n.setLocale()method before Combobox initialization to apply the settings:
dhx.i18n.setLocale("combobox", de);
const combo = new dhx.Combobox("combo_container");