diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/deprecation.txt | 3 | ||||
| -rw-r--r-- | docs/releases/1.7.txt | 7 | ||||
| -rw-r--r-- | docs/topics/i18n/translation.txt | 9 |
3 files changed, 17 insertions, 2 deletions
diff --git a/docs/internals/deprecation.txt b/docs/internals/deprecation.txt index bf26d8d855..42b81419ec 100644 --- a/docs/internals/deprecation.txt +++ b/docs/internals/deprecation.txt @@ -410,6 +410,9 @@ these changes. * The ``Model._meta.get_(add|change|delete)_permission`` methods will be removed. +* The session key ``django_language`` will no longer be read for backwards + compatibility. + 1.9 --- diff --git a/docs/releases/1.7.txt b/docs/releases/1.7.txt index d5c1f886da..699566f1d3 100644 --- a/docs/releases/1.7.txt +++ b/docs/releases/1.7.txt @@ -302,6 +302,13 @@ Internationalization * The :attr:`django.middleware.locale.LocaleMiddleware.response_redirect_class` attribute allows you to customize the redirects issued by the middleware. +* The :class:`~django.middleware.locale.LocaleMiddleware` now stores the user's + selected language with the session key ``_language``. Previously it was + stored with the key ``django_language``, but keys reserved for Django should + start with an underscore. For backwards compatibility ``django_language`` is + still read from in 1.7. Sessions will be migrated to the new ``_language`` + key as they are written. + Management Commands ^^^^^^^^^^^^^^^^^^^ diff --git a/docs/topics/i18n/translation.txt b/docs/topics/i18n/translation.txt index d8c2b49724..08e87b1425 100644 --- a/docs/topics/i18n/translation.txt +++ b/docs/topics/i18n/translation.txt @@ -1594,8 +1594,13 @@ following this algorithm: root URLconf. See :ref:`url-internationalization` for more information about the language prefix and how to internationalize URL patterns. -* Failing that, it looks for a ``django_language`` key in the current - user's session. +* Failing that, it looks for a ``_language`` key in the current user's session. + + .. versionchanged:: 1.7 + + In previous versions, the key was named ``django_language`` but it was + renamed to start with an underscore to denote a Django reserved session + key. * Failing that, it looks for a cookie. |
