Re: Odp: Re: Storing language in session/cookie

2011-09-05 Thread Vlastimil Zíma
I just find out ticket #15902 while searching for completely different thing :) I support storing language into cookie only (as final state) for reasons we encountered in our applications: - Language is not forgotten when user logs out / is logged out. - When this happens with languge in se

Re: Odp: Re: Odp: Re: Storing language in session/cookie

2011-06-28 Thread Mikoskay
Yes, but obviously this is not going to be the blessed, default behavior. -- Mikołaj Siedlarek On Mon, Jun 27, 2011 at 3:15 PM, Max Arnold wrote: > Another approach is to store language in the url (useful for mobile > handsets where disabled or unsupported cookies is still an issue). Django >

Re: Odp: Re: Odp: Re: Storing language in session/cookie

2011-06-27 Thread Max Arnold
Another approach is to store language in the url (useful for mobile handsets where disabled or unsupported cookies is still an issue). Django app which uses this method: https://bitbucket.org/carljm/django-localeurl -- You received this message because you are subscribed to the Google Groups

Odp: Re: Odp: Re: Storing language in session/cookie

2011-04-26 Thread Mikołaj S .
I don't see any good reason to store the language in session rather than cookie. And storing it in cookie has major advantage, that is avoiding creating unnnecessary sessions. I say if LocaleMiddleware is in our way to better behavior, let's just change it. But I understand that revolution is n

Re: Odp: Re: Storing language in session/cookie

2011-04-26 Thread Madis
Well we are actually not trying to address the issue on ticket #13217 I think. We are addressing the way language gets stored for the client. Because LocaleMiddleware checks for a session anyway. If it was decided wontfix then doing it the way I supposed should be OK I think. If I'm mistaken - ple

Re: Odp: Re: Storing language in session/cookie

2011-04-26 Thread Luke Plant
On 26/04/11 14:21, Madis wrote: > Well I think there is no need for another setting and I think there is > no problem setting the lang twice - as then the cookie is not always > accessed as it first checks for the language in the session. It only > looks for it in the cookie if there is no session

Re: Odp: Re: Storing language in session/cookie

2011-04-26 Thread Madis
There is also a ticket here which proposes a patch - http://code.djangoproject.com/ticket/14825 I used it last night - it also works but wont give the users the freedom to choose if they want to set the lang cookie or not and also adds overhead. -- You received this message because you are subscr

Re: Odp: Re: Storing language in session/cookie

2011-04-26 Thread Madis
Well I think there is no need for another setting and I think there is no problem setting the lang twice - as then the cookie is not always accessed as it first checks for the language in the session. It only looks for it in the cookie if there is no session or the customer is returning to the site

Odp: Re: Storing language in session/cookie

2011-04-26 Thread Mikołaj S .
As lukeplant commented on a ticket: This is proposing the same thing as #12794, but for a different reason. #13217 is related, but the solution proposed here was not proposed there, and doesn't have the sa

Odp: Re: Storing language in session/cookie

2011-04-26 Thread Mikołaj S .
I've created a ticket: http://code.djangoproject.com/ticket/15902 I agree with Madis. Having a setting to choose where the current language is stored would be convenient and also backwards compatible. How do you think the setting should look like? I propose: LANGUAGE_FORCE_COOKIE ...which defa