﻿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
15318	A possibility to configure the language's cookie domain and expires.	sahid	Sergey Kolosov	"Hello,

A suggest a new settings: LANGUAGE_COOKIE_DOMAIN


{{{
Index: conf/global_settings.py
===================================================================
--- conf/global_settings.py	(revision 15552)
+++ conf/global_settings.py	(working copy)
@@ -112,6 +112,8 @@
 USE_I18N = True
 LOCALE_PATHS = ()
 LANGUAGE_COOKIE_NAME = 'django_language'
+LANGUAGE_COOKIE_DOMAIN = None
+LANGUAGE_COOKIE_EXPIRES = None
 
 # If you set this to True, Django will format dates, numbers and calendars
 # according to user current locale
Index: views/i18n.py
===================================================================
--- views/i18n.py	(revision 15552)
+++ views/i18n.py	(working copy)
@@ -32,7 +32,11 @@
             if hasattr(request, 'session'):
                 request.session['django_language'] = lang_code
             else:
-                response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang_code)
+                response.set_cookie(
+                    settings.LANGUAGE_COOKIE_NAME,
+                    lang_code,
+                    expires=settings.LANGUAGE_COOKIE_EXPIRES,
+                    domain=settings.LANGUAGE_COOKIE_DOMAIN)
     return response
 
 def get_formats():
}}}"	New feature	closed	Internationalization	1.2	Normal	fixed	cookie, domain, language, settings		Accepted	1	0	0	0	0	0
