From f55c1934f6a4f09c0162bcd4de4ac1ac94855b03 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sat, 2 Jul 2016 14:14:31 +0200 Subject: [PATCH] Language display optimized Language is now no longer direct array access but provided through a function. This can be later used to hot load language files instead of pre-loading them. --- Theme/Backend/mid-side.tpl.php | 4 ++-- Theme/Backend/mid.tpl.php | 2 +- Theme/backend/mid-side.tpl.php | 4 ++-- Theme/backend/mid.tpl.php | 2 +- Theme/backend/side.tpl.php | 4 ++-- Theme/backend/top.tpl.php | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Theme/Backend/mid-side.tpl.php b/Theme/Backend/mid-side.tpl.php index 8eff47c..e3b5349 100644 --- a/Theme/Backend/mid-side.tpl.php +++ b/Theme/Backend/mid-side.tpl.php @@ -20,7 +20,7 @@ /* Looping through all links */ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) { echo '
' - . '

' . $this->l11n->lang[0]['Navigation'] + . '

' . $this->l11n->getText(0, 'Navigation') . '' . '

' . '
' @@ -31,7 +31,7 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) /** @var array $data */ if ($link['nav_parent'] == $data[1]) { echo '
  • ' - . $this->l11n->lang[5][$link['nav_name']] . ''; + . $this->l11n->getText(5, $link['nav_name']) . ''; } } } diff --git a/Theme/Backend/mid.tpl.php b/Theme/Backend/mid.tpl.php index 8899d26..e98bd71 100644 --- a/Theme/Backend/mid.tpl.php +++ b/Theme/Backend/mid.tpl.php @@ -23,7 +23,7 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT])) { foreach ($parent as $link) { if ($link['nav_parent'] == $this->parent) { echo '
  • ' - . $this->l11n->lang['Navigation'][$link['nav_name']] . ''; + . $this->l11n->getText('Navigation', $link['nav_name']) . ''; } } } diff --git a/Theme/backend/mid-side.tpl.php b/Theme/backend/mid-side.tpl.php index 8eff47c..e3b5349 100644 --- a/Theme/backend/mid-side.tpl.php +++ b/Theme/backend/mid-side.tpl.php @@ -20,7 +20,7 @@ /* Looping through all links */ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) { echo '
    ' - . '

    ' . $this->l11n->lang[0]['Navigation'] + . '

    ' . $this->l11n->getText(0, 'Navigation') . '' . '

    ' . '
    ' @@ -31,7 +31,7 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) /** @var array $data */ if ($link['nav_parent'] == $data[1]) { echo '
  • ' - . $this->l11n->lang[5][$link['nav_name']] . ''; + . $this->l11n->getText(5, $link['nav_name']) . ''; } } } diff --git a/Theme/backend/mid.tpl.php b/Theme/backend/mid.tpl.php index 8899d26..e98bd71 100644 --- a/Theme/backend/mid.tpl.php +++ b/Theme/backend/mid.tpl.php @@ -23,7 +23,7 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT])) { foreach ($parent as $link) { if ($link['nav_parent'] == $this->parent) { echo '
  • ' - . $this->l11n->lang['Navigation'][$link['nav_name']] . ''; + . $this->l11n->getText('Navigation', $link['nav_name']) . ''; } } } diff --git a/Theme/backend/side.tpl.php b/Theme/backend/side.tpl.php index 7a372cc..c5225c4 100644 --- a/Theme/backend/side.tpl.php +++ b/Theme/backend/side.tpl.php @@ -25,12 +25,12 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::SIDE])) : ?> - l11n->lang['Navigation'][$parent['nav_name']]; ?>
  • - l11n->lang['Navigation'][$link['nav_name']]; ?> + l11n->getText('Navigation', $link['nav_name']); ?> diff --git a/Theme/backend/top.tpl.php b/Theme/backend/top.tpl.php index ec2d726..f8264df 100644 --- a/Theme/backend/top.tpl.php +++ b/Theme/backend/top.tpl.php @@ -27,7 +27,7 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::TOP])): ?> - l11n->lang['Navigation'][$link['nav_name']]; ?> + l11n->getText('Navigation', $link['nav_name']); ?>