We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 35ec02d commit 1af859bCopy full SHA for 1af859b
translation.rst
@@ -866,7 +866,9 @@ services::
866
// (from now on, the application will use 'fr' (French) as the
867
// locale; including the default locale used to translate Twig templates)
868
$this->localeSwitcher->setLocale('fr');
869
-
+ // reset the current locale of your application to the configured default locale
870
+ // in config/packages/translation.yaml, by option 'default_locale'
871
+ $this->localeSwitcher->reset();
872
// you can also run some code with a certain locale, without
873
// changing the locale for the rest of the application
874
$this->localeSwitcher->runWithLocale('es', function() {
0 commit comments