Skip to content

Commit

Permalink
Fixed JS translation not working
Browse files Browse the repository at this point in the history
  • Loading branch information
josaphatim committed Feb 21, 2024
1 parent d30b645 commit 2a624a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/core/output_modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -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];'.
' }'.
Expand Down

0 comments on commit 2a624a9

Please sign in to comment.