diff options
author | Simon Rettberg | 2014-08-12 16:45:05 +0200 |
---|---|---|
committer | Simon Rettberg | 2014-08-12 16:45:05 +0200 |
commit | e9518cdb81eff6b59049709c8cbc74df14660f53 (patch) | |
tree | 8f417d12d89c7d43383a2acc101f67a9e03502f8 /inc/dictionary.inc.php | |
parent | Some sanity checks; start making detection of available languages dynamic; pu... (diff) | |
parent | [i18n] removed .json files and corrected the menu links (diff) | |
download | slx-admin-e9518cdb81eff6b59049709c8cbc74df14660f53.tar.gz slx-admin-e9518cdb81eff6b59049709c8cbc74df14660f53.tar.xz slx-admin-e9518cdb81eff6b59049709c8cbc74df14660f53.zip |
Merge branch 'i18n' of https://gitlab.c3sl.ufpr.br/cdn/slx-admin into i18n
Conflicts:
lang/i18n.php
modules/translation.inc.php
Diffstat (limited to 'inc/dictionary.inc.php')
-rw-r--r-- | inc/dictionary.inc.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php index 58127c18..b8a888d5 100644 --- a/inc/dictionary.inc.php +++ b/inc/dictionary.inc.php @@ -58,7 +58,10 @@ class Dictionary if ($content === false) Util::traceError("Could not find language file $template for language $lang"); $language = array('lang' => $lang); - return array_merge($language, json_decode($content, true)); + $json = json_decode($content, true); + if (!is_array($json)) + return $language; + return array_merge($language, $json); } public static function translate($string) |