Skip to content

Commit 99b3c4f

Browse files
committed
minor #20981 [Translation] Clarifying LocaleSwitcher's behavior (ktherage)
This PR was submitted for the 7.2 branch but it was merged into the 6.4 branch instead. Discussion ---------- [Translation] Clarifying LocaleSwitcher's behavior <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- 38c015c Clarifying LocaleSwitcher's behavior
2 parents 6556d97 + 38c015c commit 99b3c4f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

translation.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1110,6 +1110,13 @@ just to run some code. Imagine a console command that renders Twig templates
11101110
of emails in different languages. You need to change the locale only to
11111111
render those templates.
11121112

1113+
.. note::
1114+
1115+
The LocaleSwitcher will apply the locale at a request level
1116+
this means that it will be available only for that request. A
1117+
redirect, for example, will cancel the LocaleSwitcher's effect.
1118+
For a permanent locale switch between requests see https://symfony.com/doc/current/session.html#making-the-locale-sticky-during-a-user-s-session.
1119+
11131120
The ``LocaleSwitcher`` class allows you to change at once the locale
11141121
of:
11151122

0 commit comments

Comments
 (0)