Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed #17723 -- Mentioned the changes done in r17547. Thanks, ryankask.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17627 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 40b248acc76c833710e58f2539563b8bbaee4336 1 parent d93a2ef
Jannis Leidel jezdez authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 docs/ref/utils.txt
8 docs/ref/utils.txt
View
@@ -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).
Please sign in to comment.
Something went wrong with that request. Please try again.