Opened 4 years ago
Last modified 4 years ago
#32533 closed Uncategorized
i18n l10n set the Accept-Language but always get settings.LANGUAGE_CODE — at Initial Version
Reported by: | iwmbm | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 3.1 |
Severity: | Normal | Keywords: | i18n, l10n |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
settings.py
LANGUAGE_CODE = 'zh-hant'
MIDDLEWARE = [
...
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.middleware.common.CommonMiddleware',
...
]
browser request headers
Accept-Language:Accept-Language: en,en-US;q=0.9,de;q=0.8
i try to get request.LANGUAGE_CODE but always return zh-hant
there's one more thing
in chinese language
browser will set Accept-Language zh-HK zh-TW zh-CN
but django only support zh-Hant and zh-Hans
what can i do to support zh-HK zh-TW zh-CN