Problem detecting language selection

13 views
Skip to first unread message

Dan Sellars

unread,
Dec 18, 2013, 2:48:35 PM12/18/13
to django...@googlegroups.com
Hello,

First time poster here, I am using django 1.6 and Python 2.7.2. I am having a problem with the l18n functionality and I wondered if anyone could point me at a work around.

The problem I am having is that the first time I go to my page the language is being stored in the session and I can't see any way to stop this.

I have read the details about the language selection on this page https://docs.djangoproject.com/en/1.6/topics/i18n/translation/selection, I am just unsure how to override this behavior.

What I want to be able to do is set my browser language preference to English and look at the page in English, then change it to French and reload it to see the page in French.

I tried using translation.get_language_from_request(request,False) and then manually activating the language but that does not seem to do what I thoughts as it still returns en when fr is the first entry on my accept-language header.

Have anyone else faced this problem?

Cheers,
Dan.


Reply all
Reply to author
Forward
0 new messages