Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4c9291d

Browse filesBrowse files
committed
Minor reword
1 parent 35d1090 commit 4c9291d
Copy full SHA for 4c9291d

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎translation.rst

Copy file name to clipboardExpand all lines: translation.rst
+5-5Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.