Skip to content

Commit fd29a7e

Browse files
committed
Merge remote-tracking branch 'origin/2.2' into 2.2
2 parents 934a540 + 4d13629 commit fd29a7e

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

book/translation.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -520,15 +520,13 @@ via the ``request`` object::
520520

521521
$request->setLocale('en_US');
522522

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::
528524

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.
530527

531-
$this->get('session')->set('_locale', 'en_US');
528+
.. index::
529+
single: Translations; Fallback and default locale
532530

533531
See the :ref:`book-translation-locale-url` section below about setting the
534532
locale via routing.

0 commit comments

Comments
 (0)