Code

Ticket #5489: i18n.diff

File i18n.diff, 1.3 KB (added by msaelices, 7 years ago)
Line 
1Index: docs/i18n.txt
2===================================================================
3--- docs/i18n.txt       (revisión: 6269)
4+++ docs/i18n.txt       (copia de trabajo)
5@@ -641,15 +641,15 @@
6 
7 (Note that this example makes the view available at ``/i18n/setlang/``.)
8 
9-The view expects to be called via the ``GET`` method, with a ``language``
10-parameter set in the query string. If session support is enabled, the view
11+The view expects to be called via the ``POST`` method, with a ``language``
12+parameter set in request. If session support is enabled, the view
13 saves the language choice in the user's session. Otherwise, it saves the
14 language choice in a ``django_language`` cookie.
15 
16 After setting the language choice, Django redirects the user, following this
17 algorithm:
18 
19-    * Django looks for a ``next`` parameter in the query string.
20+    * Django looks for a ``next`` parameter in ``POST`` request.
21     * If that doesn't exist, or is empty, Django tries the URL in the
22       ``Referer`` header.
23     * If that's empty -- say, if a user's browser suppresses that header --
24@@ -657,7 +657,7 @@
25 
26 Here's example HTML template code::
27 
28-    <form action="/i18n/setlang/" method="get">
29+    <form action="/i18n/setlang/" method="post">
30     <input name="next" type="hidden" value="/next/page/" />
31     <select name="language">
32     {% for lang in LANGUAGES %}