summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/ref/utils.txt9
-rw-r--r--docs/releases/1.8.txt3
2 files changed, 11 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index 327f44bbfc..195647ea15 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -1098,7 +1098,14 @@ For a complete discussion on the usage of the following see the
.. function:: get_language()
- Returns the currently selected language code.
+ Returns the currently selected language code. Returns ``None`` if
+ translations are temporarily deactivated (by :func:`deactivate_all()` or
+ when ``None`` is passed to :func:`override()`).
+
+ .. versionchanged:: 1.8
+
+ Before Django 1.8, ``get_language()`` always returned
+ :setting:`LANGUAGE_CODE` when translations were deactivated.
.. function:: get_language_bidi()
diff --git a/docs/releases/1.8.txt b/docs/releases/1.8.txt
index cb25a7e8b3..ddcb9a992d 100644
--- a/docs/releases/1.8.txt
+++ b/docs/releases/1.8.txt
@@ -1021,6 +1021,9 @@ Miscellaneous
this will not happen any longer. It might be that new database migrations are
generated (once) after migrating to 1.8.
+* :func:`django.utils.translation.get_language()` now returns ``None`` instead
+ of :setting:`LANGUAGE_CODE` when translations are temporarily deactivated.
+
.. _deprecated-features-1.8:
Features deprecated in 1.8