Language codes are case-sensitive
Currently, language codes are case sensitive. If an app has a translation with en-US
, it won't be shown by Django to a user who has this in their ACCEPT_LANGUAGES
, because Django lower-cases all language codes and en-us != en-US
.
From https://docs.djangoproject.com/en/1.11/topics/i18n/#term-language-code
Examples: it, de-at, es, pt-br. Language codes are generally represented in lower-case, but the HTTP Accept-Language header is case-insensitive.
When working on this, it might be useful to add something like this to the settings to make American English a supported language:
from django.conf import global_settings
LANGUAGES = [('en-us', 'American English')] + global_settings.LANGUAGES