From 2a624a96433f8201c901c15b8807540eba227203 Mon Sep 17 00:00:00 2001 From: Josaphat Imani Date: Wed, 21 Feb 2024 15:21:20 +0200 Subject: [PATCH] Fixed JS translation not working --- modules/core/output_modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/output_modules.php b/modules/core/output_modules.php index a9c17d2b53..fbcef74508 100644 --- a/modules/core/output_modules.php +++ b/modules/core/output_modules.php @@ -626,7 +626,7 @@ protected function output() { $res .= 'window.hm_current_lang = "'.$this->lang.'";'. 'window.hm_translations = '.json_encode($this->all_trans()).';'. 'var hm_trans = function(key, lang = window.hm_current_lang) {'. - ' const langTranslations = window.translations && window.translations[lang];'. + ' const langTranslations = window.hm_translations && window.hm_translations[lang];'. ' if (langTranslations && langTranslations[key] !== undefined && langTranslations[key] !== false) {'. ' return langTranslations[key];'. ' }'.