summaryrefslogtreecommitdiffstats
path: root/inc/dictionary.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2014-08-13 05:19:48 +0200
committerSimon Rettberg2014-08-13 05:19:48 +0200
commitdaa01cd95af746a65b9f8e258d6638a57ec4a4de (patch)
treedf17ca46a1a23fc68778c1ccffa406b9458c74f6 /inc/dictionary.inc.php
parent[translation] Hide templates with no lang_* tags (diff)
downloadslx-admin-daa01cd95af746a65b9f8e258d6638a57ec4a4de.tar.gz
slx-admin-daa01cd95af746a65b9f8e258d6638a57ec4a4de.tar.xz
slx-admin-daa01cd95af746a65b9f8e258d6638a57ec4a4de.zip
Don't bail out if a json file doesn't exist for a given lang+template
Diffstat (limited to 'inc/dictionary.inc.php')
-rw-r--r--inc/dictionary.inc.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/inc/dictionary.inc.php b/inc/dictionary.inc.php
index b8a888d5..3a157555 100644
--- a/inc/dictionary.inc.php
+++ b/inc/dictionary.inc.php
@@ -54,10 +54,10 @@ class Dictionary
if ($lang === false)
$lang = LANG;
$file = "lang/" . $lang . "/" . $template . ".json";
- $content = @file_get_contents($file);
- if ($content === false)
- Util::traceError("Could not find language file $template for language $lang");
$language = array('lang' => $lang);
+ $content = @file_get_contents($file);
+ if ($content === false) // File does not exist for language
+ return $language;
$json = json_decode($content, true);
if (!is_array($json))
return $language;