summaryrefslogtreecommitdiffstats
path: root/inc/render.inc.php
diff options
context:
space:
mode:
authorSimon Rettberg2016-05-04 18:27:28 +0200
committerSimon Rettberg2016-05-04 18:27:28 +0200
commit80424b29e00609bf837119fa810b5afdadf2b4e9 (patch)
treee59c49265aeb219c4137bdf21e71262201345b99 /inc/render.inc.php
parentWIP (diff)
downloadslx-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.php7
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 . '}}';