Ticket #5603: language_cookie_name.diff
File language_cookie_name.diff, 1.7 KB (added by , 17 years ago) |
---|
-
django/utils/translation/trans_real.py
338 338 if lang_code in supported and lang_code is not None and check_for_language(lang_code): 339 339 return lang_code 340 340 341 lang_code = request.COOKIES.get( 'django_language', None)341 lang_code = request.COOKIES.get( settings.LANGUAGE_COOKIE_NAME, None) 342 342 if lang_code in supported and lang_code is not None and check_for_language(lang_code): 343 343 return lang_code 344 344 -
django/views/i18n.py
22 22 if hasattr(request, 'session'): 23 23 request.session['django_language'] = lang_code 24 24 else: 25 response.set_cookie( 'django_language', lang_code)25 response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang_code) 26 26 return response 27 27 28 28 NullSource = """ -
django/conf/global_settings.py
90 90 # to load the internationalization machinery. 91 91 USE_I18N = True 92 92 93 # 94 # Make sure that this is different to to all 95 # other cookie names (e.g. SESSION_COOKIE_NAME) 96 # 97 LANGUAGE_COOKIE_NAME = 'django_language' 98 93 99 # Not-necessarily-technical managers of the site. They get broken link 94 100 # notifications and other various e-mails. 95 101 MANAGERS = ADMINS