Skip to content

Commit 4c9291d

Browse files
committed
Minor reword
1 parent 35d1090 commit 4c9291d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

translation.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -850,7 +850,7 @@ of:
850850
851851
use Symfony\Component\Translation\LocaleSwitcher;
852852
853-
class SomeClass
853+
class SomeService
854854
{
855855
private LocaleSwitcher $localeSwitcher;
856856
@@ -885,10 +885,10 @@ of:
885885
}
886886
}
887887
888-
.. note::
889-
890-
The class :class:`Symfony\\Component\\Translation\\LocaleSwitcher` is
891-
autowired to the ``translation.locale_switcher`` service.
888+
When using :ref:`autowiring <services-autowire>`, type-hint any controller or
889+
service argument with the :class:`Symfony\\Component\\Translation\\LocaleSwitcher`
890+
class to inject the locale switcher service. Otherwise, configure your services
891+
manually and inject the ``translation.locale_switcher`` service.
892892

893893
Translating Database Content
894894
----------------------------

0 commit comments

Comments
 (0)