﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
6409	Locale middleware: user language preference ignored when set to a value of the xx-yy  form	nicholasdsj@…	Simon Blanchard	"I found there is a bug in method ""get_language_from_request"" in trans_real.py

I want to support Chinese language in django, but my LANGUAGE_CODE is ""en-gb"". I added locales in my browser in this order ""zh-cn, de-de, en-us"" in order to emulate different languages.

While debugging this application, it never hits ""zh-cn"" locale. It caused by normalizing function. It changes ""zh-cn"" to ""zh_CN"", but ""zh_CN"" is not in settings.LANGUAGES. So Chinese locale is always missed while the settings.LANGUAGE_CODE is not set to ""zh-cn""."		closed	Internationalization	dev		fixed	i18n Chinese locale localemiddleware  get_language_from_request HTTP_ACCEPT_LANGUAGE	bnomis@…	Unreviewed	1	0	0	0	0	0
