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 Version 3

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 (last modified by iwmbm)

Hello, everyone!

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

Change History (3)

comment:1 by iwmbm, 4 years ago

Description: modified (diff)

comment:2 by iwmbm, 4 years ago

Description: modified (diff)

comment:3 by iwmbm, 4 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top