Skip to content

Commit 1af859b

Browse files
document reset
Co-authored-by: Maxime Doutreluingne <maxime.doutreluingne@gmail.com>
1 parent 35ec02d commit 1af859b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

translation.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -866,7 +866,9 @@ services::
866866
// (from now on, the application will use 'fr' (French) as the
867867
// locale; including the default locale used to translate Twig templates)
868868
$this->localeSwitcher->setLocale('fr');
869-
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();
870872
// you can also run some code with a certain locale, without
871873
// changing the locale for the rest of the application
872874
$this->localeSwitcher->runWithLocale('es', function() {

0 commit comments

Comments
 (0)