diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-25 22:53:44 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2008-08-25 22:53:44 +0000 |
| commit | 6a5cc9e7f67a1083bb9de89356b85e5982026538 (patch) | |
| tree | 92a3aa6e2b9b56b3e9db3dd952edf53f29b320e7 | |
| parent | ddb3cdd514588bfae7a44ee6b1a12857e8833cf1 (diff) | |
Fixed #7831: be case-insensitive when in `get_language_from_request`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8561 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/utils/translation/trans_real.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/utils/translation/trans_real.py b/django/utils/translation/trans_real.py index 93bb3c9bf9..18a009ddb4 100644 --- a/django/utils/translation/trans_real.py +++ b/django/utils/translation/trans_real.py @@ -381,7 +381,7 @@ def get_language_from_request(request): for lang, dirname in ((accept_lang, normalized), (accept_lang.split('-')[0], normalized.split('_')[0])): - if lang not in supported: + if lang.lower() not in supported: continue langfile = os.path.join(globalpath, dirname, 'LC_MESSAGES', 'django.mo') |
