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

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

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

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 -

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

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

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

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

Re: Storing language in session/cookie

2011-04-25 Thread Madis
Well yes I think there is an issue here for sure. I think it would be quite easy to solve this as follows - but I'm not sure if it's the best approach. There is a setting named LANGUAGE_COOKIE_NAME which never gets used if you use session based cookies. The file cookie is just never saved. But if

Re: Storing language in session/cookie

2011-03-08 Thread Mikołaj S .
Sorry for bumping the thread, but could somebody familiar with session subsystem anwer it? It is critical for my work to know if this issue is my problem or Django's. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group,

Re: Storing language in session/cookie

2011-03-05 Thread Mikołaj S .
If I understand the middleware correctly, session cookie is created only when the session itself is modified, unless SESSION_SAVE_EVERY_REQUEST is True. So, after user language is set but before user authentication there could be only one, language cookie. I think that

Re: Storing language in session/cookie

2011-03-04 Thread Łukasz Rekucki
2011/3/4 Mikołaj S. : > I know, but it just seems so obvious to me that I can't believe no one have > ever encountered this problem before - I felt like I should ask ;) > > -- > You received this message because you are subscribed to the Google Groups > "Django developers"

Re: Storing language in session/cookie

2011-03-04 Thread Mikołaj S .
I know, but it just seems so obvious to me that I can't believe no one have ever encountered this problem before - I felt like I should ask ;) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

Re: Storing language in session/cookie

2011-03-04 Thread Paul McMillan
I'm not familiar with that subsystem, but if what you say is correct, you should open a ticket. That sounds like a definite issue to me. -Paul -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to

Storing language in session/cookie

2011-03-04 Thread Mikołaj S .
Hi, I'd like to make a proposal of changing the way that current language is stored, at least, making this changeable by settings. The problem is that even for non-logged users their language is stored in session (if it's supported or in the cookie otherwise). That creates a session for every