1
0
mirror of https://github.com/django/django.git synced 2025-07-04 17:59:13 +00:00

i18n: language en is now successfully recognized on accept-header parsing

git-svn-id: http://code.djangoproject.com/svn/django/branches/i18n@759 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Georg Bauer 2005-10-01 15:45:07 +00:00
parent 59052e48db
commit 280747f757

View File

@ -205,7 +205,7 @@ def get_language_from_request(request):
globalpath = os.path.join(os.path.dirname(settings.__file__), 'locale')
for lang, order in langs:
if os.path.isfile(os.path.join(globalpath, lang, 'LC_MESSAGES', 'django.mo')):
if lang == 'en' or os.path.isfile(os.path.join(globalpath, lang, 'LC_MESSAGES', 'django.mo')):
_accepted[accept] = lang
return lang