summaryrefslogtreecommitdiff
path: root/docs/ref
diff options
context:
space:
mode:
Diffstat (limited to 'docs/ref')
-rw-r--r--docs/ref/utils.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/ref/utils.txt b/docs/ref/utils.txt
index f7ec638dd5..aec00c7d16 100644
--- a/docs/ref/utils.txt
+++ b/docs/ref/utils.txt
@@ -591,13 +591,19 @@ For a complete discussion on the usage of the following see the
* ``False`` = left-to-right layout
* ``True`` = right-to-left layout
-.. function:: get_language_from_request(request)
+.. function:: get_language_from_request(request, check_path=False)
+
+ .. versionchanged:: 1.4
Analyzes the request to find what language the user wants the system to show.
Only languages listed in settings.LANGUAGES are taken into account. If the user
requests a sublanguage where we have a main language, we send out the main
language.
+ If ``check_path`` is ``True`` the function first checks the requested URL
+ whether its path begins with a language code listed in the
+ :setting:`LANGUAGES` setting.
+
.. function:: to_locale(language)
Turns a language name (en-us) into a locale name (en_US).