diff options
Diffstat (limited to 'src/Middleware')
-rw-r--r-- | src/Middleware/LegacyMiddleware.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Middleware/LegacyMiddleware.php b/src/Middleware/LegacyMiddleware.php index 78132815..233f66b2 100644 --- a/src/Middleware/LegacyMiddleware.php +++ b/src/Middleware/LegacyMiddleware.php @@ -83,9 +83,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); |