Localization & stuff

This commit is contained in:
2022-11-30 16:42:24 +01:00
parent 25ef07b0b7
commit 1ba27e4f40
54 changed files with 856 additions and 494 deletions

View File

@@ -150,7 +150,25 @@ let Core = function () {
return this.getJsonDateTime(date).split(' ')[1];
};
this.isRecaptchaEnabled = function () {
return (typeof grecaptcha !== 'undefined');
}
this.__construct();
};
let jsCore = new Core();
let jsCore = new Core();
function L(key) {
let entries = window.languageEntries || {};
let [module, variable] = key.split(".");
if (module && variable && entries.hasOwnProperty(module)) {
let translation = entries[module][variable];
if (translation) {
return translation;
}
}
return "[" + key + "]";
}