Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 38c015c

Browse filesBrowse files
ktheragejaviereguiluz
authored andcommitted
Clarifying LocaleSwitcher's behavior
1 parent 6556d97 commit 38c015c
Copy full SHA for 38c015c

File tree

1 file changed

+7
-0
lines changed
Filter options

1 file changed

+7
-0
lines changed

‎translation.rst

Copy file name to clipboardExpand all lines: translation.rst
+7Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.