Skip to content

Commit 6f2d09c

Browse files
committed
minor #9119 Update translation.rst (jakumi)
This PR was submitted for the 4.0 branch but it was squashed and merged into the 2.7 branch instead (closes #9119). Discussion ---------- Update translation.rst `MessageSelector` doesn't implement `Symfony\Component\Translation\Formatter\MessageFormatterInterface` - the expected second parameter for `Translator::__construct`, which is generated if not provided anyway. removing the second parameter in the example seems like the best option imho. Commits ------- 33ac660 Update translation.rst
2 parents b312234 + 33ac660 commit 6f2d09c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

components/translation.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ The constructor of the ``Translator`` class needs one argument: The locale.
3434
.. code-block:: php
3535
3636
use Symfony\Component\Translation\Translator;
37-
use Symfony\Component\Translation\MessageSelector;
3837
39-
$translator = new Translator('fr_FR', new MessageSelector());
38+
$translator = new Translator('fr_FR');
4039
4140
.. note::
4241

0 commit comments

Comments
 (0)