Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.2k
[Translation] Clarifying LocaleSwitcher's behavior#20981
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1110,6 +1110,13 @@ just to run some code. Imagine a console command that renders Twig templates | ||||||||||||||||||
of emails in different languages. You need to change the locale only to | ||||||||||||||||||
render those templates. | ||||||||||||||||||
.. note:: | ||||||||||||||||||
The LocaleSwitcher will apply the locale at a request level | ||||||||||||||||||
this means that it will be available only for that request. A | ||||||||||||||||||
redirect, for example, will cancel the LocaleSwitcher's effect. | ||||||||||||||||||
For a permanent locale switch between requests see https://symfony.com/doc/current/session.html#making-the-locale-sticky-during-a-user-s-session. | ||||||||||||||||||
Comment on lines +1115 to +1118 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Suggested change
About the URL, can you follow the RST format for links please? (seehttps://github.com/symfony/symfony-docs/pull/20981/files#diff-9ee808b36fb9f3ce98827e47f96d7bf1d53c039fed97fb8364087cd629be779cR1095) | ||||||||||||||||||
The ``LocaleSwitcher`` class allows you to change at once the locale | ||||||||||||||||||
of: | ||||||||||||||||||