Jeremy,
Thanks for the explanation. I am using mod_python. I will check if my browser are sending Accept-Language. But, I suspect they do. Because, whenever caching is disabled swithing between languages works perfect. If I change for example the language settings in my browser and make for example Dutch my preferred language then the website www.localpoint.nl is rendered in Dutch. And if I make English my preferred language my website is rendered in English. So, the language settings in my browsers (FF and IE) are correctly handled by the Django. But whenever I activate caching language switching is not working anymore. Berry On Dec 26, 3:28 pm, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote:
On 12/26/06,Beegee<[EMAIL PROTECTED]> wrote: ... > > Perhaps there is a bug in locale.py. Should: > > patch_vary_headers(response, ('Accept-Language',)) > > perhaps be: > > patch_vary_headers(response, ('Content-Language',)) ... > I made the change mentioned above. But, it simply does NOT work! > Whenever I enable global caching I can NOT switch between languages > anymore. Only one page is saved in the cache!I apologize for mixing you up. The vary header is "the set of request-header fields that fully determines, while the response is fresh, whether a cache is permitted to use the response to reply to a subsequent request without revalidation". (rfc2616, 14.44 Vary) Which is to say, Accept-Language is the appropriate value to place in the Vary header, since that is the request-header field we're interested in varying on, *not* Content-Language. Even so, have you verified that your browsers are sending Accept-Language as expected? Second, are you using mod_python or wsgi? I'm asking because the headers django.util.cache.learn_cache_key depends on are expected to be munged into request.META on round-trip. I do see that munging occurring in django.core.handlers.modpython, but not in django.core.handlers.wsgi. I haven't tested that here-- I'm not set up for trunk testing or i18n, but if you're using wsgi, this may be your bug...
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---