File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 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
893893Translating Database Content
894894----------------------------
You can’t perform that action at this time.
0 commit comments