Localization
You can apply different languages to the DHTMLX Form interface, specifically to its SimpleVault control. Translate the label strings and apply the resulting locale to the component.
Default locale
The Form SimpleVault control uses the following default (English) locale:
const en = {
simpleVaultText: "Drag & drop files or folders here or",
simpleVaultLabel: "browse files"
};
Custom locale
Follow these steps to use a different locale:
- Define the language settings: translate all text labels. For example, the German locale for the SimpleVault control is:
const de = {
simpleVaultText: "Drag & Drop Dateien oder Ordner hier oder",
simpleVaultLabel: "Suchen Sie Dateien durch"
};
- Call the
dhx.i18n.setLocale()method before Form initialization to apply the settings:
dhx.i18n.setLocale("form", de);
const form = new dhx.Form("form_container");
Related sample: Form. Localization
- For ColorPicker, DatePicker, Combo, and TimePicker controls, call the
dhx.i18n.setLocale()method with the control name as a parameter, also before Form initialization:
dhx.i18n.setLocale("form", de);
dhx.i18n.setLocale("colorpicker", de);
const form = new dhx.Form("form_container");
tip
You localize the ColorPicker, DatePicker, and Combo controls the same way as the ColorPicker, Calendar, and Combo widgets.