summaryrefslogtreecommitdiffstats
path: root/inc/render.inc.php
diff options
context:
space:
mode:
authorChristian Hofmaier2019-01-22 16:12:28 +0100
committerChristian Hofmaier2019-01-22 16:12:28 +0100
commit0a040966751e4a45fc9b9ac6cbaaea100b38ce53 (patch)
treed23dbad3cfe3130b954a9c06a2ab11b9bb9be2d0 /inc/render.inc.php
parent[locationinfo] some design rework (diff)
downloadslx-admin-0a040966751e4a45fc9b9ac6cbaaea100b38ce53.tar.gz
slx-admin-0a040966751e4a45fc9b9ac6cbaaea100b38ce53.tar.xz
slx-admin-0a040966751e4a45fc9b9ac6cbaaea100b38ce53.zip
[inc/Render] new optional argument to change rendered language
Diffstat (limited to 'inc/render.inc.php')
-rw-r--r--inc/render.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/render.inc.php b/inc/render.inc.php
index 4b1d3643..4da0567e 100644
--- a/inc/render.inc.php
+++ b/inc/render.inc.php
@@ -213,7 +213,7 @@ class Render
* @param string $module name of module to load template from; defaults to currently active module
* @return string Rendered template
*/
- public static function parse($template, $params = false, $module = false)
+ public static function parse($template, $params = false, $module = false, $lang = false)
{
if ($module === false && class_exists('Page')) {
$module = Page::getModule()->getIdentifier();
@@ -228,7 +228,7 @@ class Render
}
// Now find all language tags in this array
if (preg_match_all('/{{\s*(lang_.+?)\s*}}/', $html, $out) > 0) {
- $dictionary = Dictionary::getArray($module, 'template-tags');
+ $dictionary = Dictionary::getArray($module, 'template-tags', $lang);
$fallback = false;
foreach ($out[1] as $tag) {
if ($fallback === false && empty($dictionary[$tag])) {