diff --git a/book/translation.rst b/book/translation.rst index f4faf08289f..bd0df9c77c7 100644 --- a/book/translation.rst +++ b/book/translation.rst @@ -520,15 +520,13 @@ via the ``request`` object:: $request->setLocale('en_US'); -.. index:: - single: Translations; Fallback and default locale - -It is also possible to store the locale in the session instead of on a per -request basis. If you do this, each subsequent request will have this locale. +.. tip:: -.. code-block:: php + Read :doc:`/cookbook/session/locale_sticky_session` to learn, how to store + the user's locale in the session. - $this->get('session')->set('_locale', 'en_US'); +.. index:: + single: Translations; Fallback and default locale See the :ref:`book-translation-locale-url` section below about setting the locale via routing.