Indeed
On 11.04.2014 12:45, Daniel Roseman wrote:

On Friday, 11 April 2014 06:55:12 UTC+1, Andrew Pashkin wrote:

    Documentation says
    
<https://docs.djangoproject.com/en/1.4/topics/i18n/translation/#how-django-discovers-language-preference>,
    that:
    ...it looks for a django_language key in the current user's session
    This is the latest commit
    
<https://github.com/django/django/blob/126d9e1b499663e72cc795906bdbcd333aceaf0a/django/middleware/locale.py>
    if 1.4x branch of Django, but I can't even find word "session" in
    code with middleware.


I'm not sure why you think the reference to the session has to be in that particular file. In fact what happens is that the process_request method of that middleware calls translation.get_language_from_request, which ends up here: https://github.com/django/django/blob/126d9e1b499663e72cc795906bdbcd333aceaf0a/django/utils/translation/trans_real.py#L366
which does indeed look up the session from the request.
--
DR.
--
You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com <mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com <mailto:django-users@googlegroups.com>.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/16094d74-d20b-4cfc-8ac4-730d477bc8e1%40googlegroups.com <https://groups.google.com/d/msgid/django-users/16094d74-d20b-4cfc-8ac4-730d477bc8e1%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

--
? ?????????? ???????????, ?????? ??????.
?.? - +7 (985) 898 57 59
Skype - waves_in_fluids
e-mail - andrew.pash...@gmx.co.uk

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5348144D.2000809%40gmx.co.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to