File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -520,15 +520,13 @@ via the ``request`` object::
520
520
521
521
$request->setLocale('en_US');
522
522
523
- .. index ::
524
- single: Translations; Fallback and default locale
525
-
526
- It is also possible to store the locale in the session instead of on a per
527
- request basis. If you do this, each subsequent request will have this locale.
523
+ .. tip ::
528
524
529
- .. code-block :: php
525
+ Read :doc: `/cookbook/session/locale_sticky_session ` to learn, how to store
526
+ the user's locale in the session.
530
527
531
- $this->get('session')->set('_locale', 'en_US');
528
+ .. index ::
529
+ single: Translations; Fallback and default locale
532
530
533
531
See the :ref: `book-translation-locale-url ` section below about setting the
534
532
locale via routing.
You can’t perform that action at this time.
0 commit comments