Uncaught TypeError: can’t access property “setLocale”, window.dhx_legacy[key] is undefined
http://localhost/.../codebase/suite.js:50807
suite.js:50807:10
http://localhost/.../codebase/suite.js:50807
Ok, maybe I found the problem: I put declarations for localization of calendar and simplevault form like I read in the docs together in the same object an this caused the error.
I made this:
const it = {
months: [“Gennaio”, “Febbraio”, “Marzo”, “Aprile”, “Maggio”, “Giugno”, “Luglio”, “Agosto”, “Settembre”, “Ottobre”, “Novembre”, “Dicembre”],
monthsShort: [“Gen”, “Feb”, “Mar”, “Apr”, “Mag”, “Giu”, “Lug”, “Ago”, “Set”, “Ott”, “Nov”, “Dic”],
days: [“Domenica”, “Lunedì”, “Martedì”, “Mercoledì”, “Giovedì”, “Venerdì”, “Sabato”],
daysShort: [“Do”, “Lu”, “Ma”, “Me”, “Gi”, “Ve”, “Sa”],
cancel: “Cancella”,
simpleVaultText: “Trascina & rilascia file o cartelle qui o”,
simpleVaultLabel: “ricerca file”
};
dhx.i18n.setLocale(“calendar”, it);
dhx.i18n.setLocale(“form”, it);
(ERROR)
then I tried this:
const itCal = {
months: [“Gennaio”, “Febbraio”, “Marzo”, “Aprile”, “Maggio”, “Giugno”, “Luglio”, “Agosto”, “Settembre”, “Ottobre”, “Novembre”, “Dicembre”],
monthsShort: [“Gen”, “Feb”, “Mar”, “Apr”, “Mag”, “Giu”, “Lug”, “Ago”, “Set”, “Ott”, “Nov”, “Dic”],
days: [“Domenica”, “Lunedì”, “Martedì”, “Mercoledì”, “Giovedì”, “Venerdì”, “Sabato”],
daysShort: [“Do”, “Lu”, “Ma”, “Me”, “Gi”, “Ve”, “Sa”],
cancel: “Cancella”
};
const itForm = {
simpleVaultText: “Trascina & rilascia file o cartelle qui o”,
simpleVaultLabel: “ricerca file”
};
dhx.i18n.setLocale(“calendar”, itCal);
dhx.i18n.setLocale(“form”, itForm);
and the error disappeared.