Ticket #5603: language_cookie_name_docs.diff
File language_cookie_name_docs.diff, 2.1 KB (added by , 17 years ago) |
---|
-
settings.txt
538 538 539 539 .. _internationalization docs: ../i18n/ 540 540 541 LANGUAGE_COOKIE_NAME 542 -------------------- 543 544 Default: ``'django_language'`` 545 546 The name of the cookie to use for the language cookie. This can be whatever 547 you want but must be different to all other cookie names (e.g. SESSION_COOKIE_NAME). 548 See the `internationalization docs`_ for details. 549 550 541 551 LANGUAGES 542 552 --------- 543 553 … … 781 791 782 792 Default: ``'sessionid'`` 783 793 784 The name of the cookie to use for sessions. This can be whatever you want. 794 The name of the cookie to use for sessions. This can be whatever you want 795 but must be different to all other cookie names (e.g. LANGUAGE_COOKIE_NAME). 785 796 See the `session docs`_. 786 797 787 798 SESSION_COOKIE_PATH -
i18n.txt
539 539 540 540 * First, it looks for a ``django_language`` key in the the current user's 541 541 `session`_. 542 * Failing that, it looks for a cookie called ``django_language``.542 * Failing that, it looks for a cookie that is named according to your ``LANGUAGE_COOKIE_NAME`` setting (the default name is: ``django_language``). 543 543 * Failing that, it looks at the ``Accept-Language`` HTTP header. This 544 544 header is sent by your browser and tells the server which language(s) you 545 545 prefer, in order by priority. Django tries each language in the header … … 711 711 The view expects to be called via the ``POST`` method, with a ``language`` 712 712 parameter set in request. If session support is enabled, the view 713 713 saves the language choice in the user's session. Otherwise, it saves the 714 language choice in a ``django_language`` cookie. 714 language choice in a cookie that is by default named ``django_language`` 715 (the name can be changed through the ``LANGUAGE_COOKIE_NAME`` setting). 715 716 716 717 After setting the language choice, Django redirects the user, following this 717 718 algorithm: