From 40884b1e2ea3423c27ff8a6592d65d70c45aebd7 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 2 Oct 2013 17:31:56 +0200 Subject: [PATCH] remove wrong notice on locales in the session, add reference to the relevant cookbook article instead --- book/translation.rst | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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.