diff options
author | Simon Rettberg | 2016-05-04 18:27:28 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-04 18:27:28 +0200 |
commit | 80424b29e00609bf837119fa810b5afdadf2b4e9 (patch) | |
tree | e59c49265aeb219c4137bdf21e71262201345b99 /inc/render.inc.php | |
parent | WIP (diff) | |
download | slx-admin-80424b29e00609bf837119fa810b5afdadf2b4e9.tar.gz slx-admin-80424b29e00609bf837119fa810b5afdadf2b4e9.tar.xz slx-admin-80424b29e00609bf837119fa810b5afdadf2b4e9.zip |
Work on translations: templates and messages work
Diffstat (limited to 'inc/render.inc.php')
-rw-r--r-- | inc/render.inc.php | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/inc/render.inc.php b/inc/render.inc.php index b8abaf71..6a2872f7 100644 --- a/inc/render.inc.php +++ b/inc/render.inc.php @@ -185,16 +185,13 @@ class Render } // Now find all language tags in this array if (preg_match_all('/{{(lang_.+?)}}/', $html, $out) > 0) { - $dictionary = Dictionary::getArrayTemplate($template, $module); + $dictionary = Dictionary::getArray($module, 'template-tags'); $fallback = false; foreach ($out[1] as $tag) { // Add untranslated strings to the dictionary, so their tag is seen in the rendered page if ($fallback === false && empty($dictionary[$tag])) { $fallback = true; // Fallback to general dictionary of module - $dictionary = $dictionary + Dictionary::getArray($module, 'module'); - if ($module !== 'main') { - $dictionary = $dictionary + Dictionary::getArray('main', 'module'); - } + $dictionary = $dictionary + Dictionary::getArray('main', 'global-template-tags'); } if (empty($dictionary[$tag])) { $dictionary[$tag] = '{{' . $tag . '}}'; |