id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 15902,Store the current language in a cookie rather than the session,msiedlarek,msiedlarek,"== Related discussion == http://groups.google.com/d/topic/django-developers/8THmJSioj4U/discussion == Problem summary == 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 client, which makes serving static (ofc I mean static, but not media) content through an upstream cache (such as Squid) really inefficient. I suppose selected language is not that secret to protect it by storing in session, and cookie is just ok. For cookie-varying cache it's a huge difference. == Solution proposal == 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 there were an option to save data in the session and also save the LANGUAGE_COOKIE as a file separately - then it would also persist after logout and solve the issue with languages after the session gets destroyed. (...) I would propose to have the set_language() view with options to set it as a file based cookie or a session. (...) It would allow the language file based cookie to have a very long expire date and the session would still be usable for storing secure data. ",Cleanup/optimization,closed,Internationalization,dev,Normal,fixed,language i18n session cookie,msiedlarek raymond.penners@… vlastimil.zima@…,Accepted,1,0,0,0,0,0