diff options
Diffstat (limited to 'src/Middleware')
-rw-r--r-- | src/Middleware/LegacyMiddleware.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Middleware/LegacyMiddleware.php b/src/Middleware/LegacyMiddleware.php index 78132815..f4d6bbcc 100644 --- a/src/Middleware/LegacyMiddleware.php +++ b/src/Middleware/LegacyMiddleware.php @@ -2,6 +2,7 @@ namespace Engelsystem\Middleware; +use Engelsystem\Helpers\Translator; use Engelsystem\Http\Request; use Engelsystem\Http\Response; use Psr\Container\ContainerInterface; @@ -83,9 +84,12 @@ class LegacyMiddleware implements MiddlewareInterface } if (empty($title) and empty($content)) { + /** @var Translator $translator */ + $translator = $this->container->get('translator'); + $page = 404; - $title = _('Page not found'); - $content = _('This page could not be found or you don\'t have permission to view it. You probably have to sign in or register in order to gain access!'); + $title = $translator->translate('Page not found'); + $content = $translator->translate('This page could not be found or you don\'t have permission to view it. You probably have to sign in or register in order to gain access!'); } return $this->renderPage($page, $title, $content); |