From ff8acaa121bb8b8cbf9df1624aca53a6d82526aa Mon Sep 17 00:00:00 2001 From: Giancarlos Salas Date: Thu, 7 Dec 2017 10:31:06 -0500 Subject: [PATCH] update to translatorInterface --- translation.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/translation.rst b/translation.rst index c579158527e..bbdc0a235ac 100644 --- a/translation.rst +++ b/translation.rst @@ -120,9 +120,9 @@ for example, that you're translating a simple message from inside a controller:: // ... use Symfony\Component\HttpFoundation\Response; - use Symfony\Component\Translation\Translator; + use Symfony\Component\Translation\TranslatorInterface; - public function index(Translator $translator) + public function index(TranslatorInterface $translator) { $translated = $translator->trans('Symfony is great'); @@ -199,9 +199,9 @@ Message Placeholders Sometimes, a message containing a variable needs to be translated:: use Symfony\Component\HttpFoundation\Response; - use Symfony\Component\Translation\Translator; + use Symfony\Component\Translation\TranslatorInterface; - public function index(Translator $translator, $name) + public function index(TranslatorInterface $translator, $name) { $translated = $translator->trans('Hello '.$name);