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')