diff --git a/docs/topics/i18n/internationalization.txt b/docs/topics/i18n/internationalization.txt index a83299c1e8..807c6c53ea 100644 --- a/docs/topics/i18n/internationalization.txt +++ b/docs/topics/i18n/internationalization.txt @@ -763,7 +763,8 @@ The ``set_language`` redirect view .. function:: set_language(request) As a convenience, Django comes with a view, :func:`django.views.i18n.set_language`, -that sets a user's language preference and redirects back to the previous page. +that sets a user's language preference and redirects to a given URL or, by default, +back to the previous page. Activate this view by adding the following line to your URLconf:: @@ -792,7 +793,7 @@ Here's example HTML template code:
+ +In this example, Django looks up the URL of the page to which the user will be +redirected in the ``redirect_to`` context variable.