diff --git a/Controller/BackendController.php b/Controller/BackendController.php
index d15bebb..fdf5ae5 100644
--- a/Controller/BackendController.php
+++ b/Controller/BackendController.php
@@ -106,19 +106,19 @@ final class BackendController extends Controller
public function loadLanguage(RequestAbstract $request, ResponseAbstract $response) : void
{
$languages = $this->app->moduleManager->getLanguageFiles($request);
+ $langCode = $response->getHeader()->getL11n()->getLanguage();
foreach ($languages as $path) {
- if ($path[strlen($path) - 1] === '/') {
- // Is not a navigation file
+ $path = __DIR__ . '/../../..' . $path . '.' . $langCode . '.lang.php';
+
+ if (!\file_exists($path)) {
continue;
}
- $path = __DIR__ . '/../../..' . $path . '.' . $response->getHeader()->getL11n()->getLanguage() . '.lang.php';
-
/** @noinspection PhpIncludeInspection */
$lang = include $path;
- $this->app->l11nManager->loadLanguage($response->getHeader()->getL11n()->getLanguage(), 'Navigation', $lang);
+ $this->app->l11nManager->loadLanguage($langCode, 'Navigation', $lang);
}
}
diff --git a/Theme/Backend/mid-side.tpl.php b/Theme/Backend/mid-side.tpl.php
index 98ce3e3..3c1c639 100644
--- a/Theme/Backend/mid-side.tpl.php
+++ b/Theme/Backend/mid-side.tpl.php
@@ -17,7 +17,7 @@
/* Looping through all links */
if (isset($this->nav[\Modules\Navigation\Models\NavigationType::CONTENT_SIDE])) {
echo '
'
- . '
' . $this->getHtml('Navigation')
+ . '' . $this->getHtml('Navigation', 'Navigation')
. ''
. '
'
. ''
diff --git a/Theme/Backend/mid.tpl.php b/Theme/Backend/mid.tpl.php
index a0089e8..84b956f 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->getHtml($link['nav_name']) . '';
+ . $this->getHtml($link['nav_name'], 'Navigation') . '';
}
}
}
diff --git a/Theme/Backend/side.tpl.php b/Theme/Backend/side.tpl.php
index 9a554e0..5bca8e4 100644
--- a/Theme/Backend/side.tpl.php
+++ b/Theme/Backend/side.tpl.php
@@ -22,13 +22,13 @@ if (isset($this->nav[\Modules\Navigation\Models\NavigationType::SIDE])) : ?>
- = $this->getHtml($parent['nav_name']) ?>