Code

Ticket #14825: patch-14825.diff

File patch-14825.diff, 406 bytes (added by vzima, 4 years ago)

LocaleMiddleware patch

Line 
121,28d20
2<         if hasattr(request, 'session'):
3<             if not request.session.has_key('django_language'):
4<                 request.session['django_language'] = get_language()
5<         else:
6<             # sessions are not used
7<             if not response.cookies.has_key(settings.LANGUAGE_COOKIE_NAME):
8<                 response.set_cookie(settings.LANGUAGE_COOKIE_NAME, get_language())
9<