summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Bauer <gb@hugo.westfalen.de>2005-10-03 12:20:18 +0000
committerGeorg Bauer <gb@hugo.westfalen.de>2005-10-03 12:20:18 +0000
commit5e24a67952de6bee42152569f160b103bb7ae227 (patch)
tree7fc04221e699f250f4679cb5196b3667a71043e6
parent4196ff0b174926edae60277f5a844f2463e08162 (diff)
take django_language either from GET or POST (GET has preference if both
are given) git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@769 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/utils/translation.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/utils/translation.py b/django/utils/translation.py
index 37acfe80a3..a74bd06c71 100644
--- a/django/utils/translation.py
+++ b/django/utils/translation.py
@@ -185,8 +185,8 @@ def get_language_from_request(request):
"""
global _accepted
- if request.GET:
- lang = request.GET.get('django_language', None)
+ if request.GET or request.POST:
+ lang = request.GET.get('django_language', None) or request.POST.get('django_language', None)
if lang is not None:
if hasattr(request, 'session'):
request.session['django_language'] = lang