summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2017-12-02 13:00:30 +0100
committerTim Graham <timograham@gmail.com>2018-01-03 11:25:40 -0500
commitb3cd9fb18ba127c067a4f3c79a32e51c8d8cc6ae (patch)
tree9895f2f119b7636d0a8ab1c945745bf97c994bba /docs
parentccc25bfe4f0964a00df3af6f91c2d9e20159a0c2 (diff)
Refs #15902 -- Made set_language() view always set the current language in a cookie.
The plan is to later deprecate/remove storing the language in the session.
Diffstat (limited to 'docs')
-rw-r--r--docs/topics/i18n/translation.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt
index 2bdf40fea1..0c5121b79c 100644
--- a/docs/topics/i18n/translation.txt
+++ b/docs/topics/i18n/translation.txt
@@ -1761,10 +1761,14 @@ Activate this view by adding the following line to your URLconf::
language-independent itself to work correctly.
The view expects to be called via the ``POST`` method, with a ``language``
-parameter set in request. If session support is enabled, the view
-saves the language choice in the user's session. Otherwise, it saves the
-language choice in a cookie that is by default named ``django_language``.
-(The name can be changed through the :setting:`LANGUAGE_COOKIE_NAME` setting.)
+parameter set in request. If session support is enabled, the view saves the
+language choice in the user's session. It also saves the language choice in a
+cookie that is named ``django_language`` by default. (The name can be changed
+through the :setting:`LANGUAGE_COOKIE_NAME` setting.)
+
+.. versionchanged:: 2.1
+
+ In older versions, the cookie is only set if session support isn't enabled.
After setting the language choice, Django looks for a ``next`` parameter in the
``POST`` or ``GET`` data. If that is found and Django considers it to be a safe