easyappointments/application/views/components/js_lang_script.php
2022-01-18 10:43:40 +01:00

14 lines
276 B
PHP

<script>
window.lang = (function () {
const lang = <?= json_encode($this->lang->language) ?>;
return (key) => {
if (!key) {
return lang;
}
return lang[key] || undefined;
};
})();
</script>