Localization
You can apply different languages to the interface of DHTMLX Form, specifically to its SimpleVault control. You just need to translate the corresponding strings for Form labels and apply a ready locale to the component.
Default locale
The default (English) locale for Form SimpleVault control looks like this:
const en = {
simpleVaultText: "Drag & drop files or folders here or",
simpleVaultLabel: "browse files"
};
Custom locale
To use a different locale, your need to:
- define necessary language settings: provide translation for all text labels, e.g. the German locale for the SimpleVault control looks like this:
const de = {
simpleVaultText: "Drag & Drop Dateien oder Ordner hier oder",
simpleVaultLabel: "Suchen Sie Dateien durch"
};
- apply the language settings by calling the dhx.i18n.setLocale() method before Form initialization:
dhx.i18n.setLocale("form", de);
const form = new dhx.Form("form_container");
Related sample: Form. Localization
- apply the language settings by calling the dhx.i18n.setLocale() method with the name of the control as a parameter for ColorPicker, DatePicker, Combo, TimePicker controls before Form initialization:
dhx.i18n.setLocale("form", de);
dhx.i18n.setLocale("colorpicker", de);
const form = new dhx.Form("form_container");
tip
The localization of the ColorPicker, DatePicker, Combo controls is the same as the localization of the widgets: ColorPicker, Calendar and Combo.