diff options
author | Igor Scheller <igor.scheller@igorshp.de> | 2018-08-29 22:05:38 +0200 |
---|---|---|
committer | Igor Scheller <igor.scheller@igorshp.de> | 2018-08-29 23:46:32 +0200 |
commit | 3a1164164791edbe30c7247b98585474867dd968 (patch) | |
tree | 0776fc89332d46d415344f5accdb9a4d32521485 /src/Middleware/LegacyMiddleware.php | |
parent | acfe72cb9155ca08bd5799d0dde331702e25e9ce (diff) |
Updated LegacyMiddleware to use Translator class
Diffstat (limited to 'src/Middleware/LegacyMiddleware.php')
-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); |