Hallöchen! Salvatore Iovene writes:
> On Friday, November 4, 2011 5:31:46 PM UTC+2, Salvatore Iovene wrote: >> >> if hasattr(request, 'session'): >> request.session['django_language'] = lang >> else: >> response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang) >> > > I have solved my problem by setting the cookie unconditionally (i.e. > outside of that else-statement). I copied that code from > django.views.i18n.set_language. I wonder if that's a bug. Strange. I had the very same problem, but I identified the browser's internal caching heuristics as the problem. If there are no explicit caching headers in the response, the browser guesses. Sending e.g. "Expires: ..." so that the page expires immediately solved the problem. (By the way, I didn't send those headers eventually. The browser's heuristics make the site faster in other cases, and users switch language only seldomly.) Tschö, Torsten. -- Torsten Bronger Jabber ID: [email protected] or http://bronger-jmp.appspot.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

