File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Original file line number Diff line number Diff line change 850
850
851
851
use Symfony\Component\Translation\LocaleSwitcher;
852
852
853
- class SomeClass
853
+ class SomeService
854
854
{
855
855
private LocaleSwitcher $localeSwitcher;
856
856
@@ -885,10 +885,10 @@ of:
885
885
}
886
886
}
887
887
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.
892
892
893
893
Translating Database Content
894
894
----------------------------
You can’t perform that action at this time.
0 commit comments