﻿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
12230	to_locale not working with sr_Latn	Janoš	nobody	"There is a bug in function to_locale in django/utils/translation/trans_real.py when trying to get locale for sr-latn language.


{{{
In [1]: from django.utils.translation import to_locale

In [2]: to_locale('sr-latn')
Out[2]: 'sr_LATN'
}}}


The output should be 'sr_Latn'. It is an exception that is overlooked when new language has been added.
Because of the wrong caption Django won't recognize 'sr_Latn' folder with translations when searching trough 'locale' folders.

Patch that I have provided solves the problem, but there could be a different condition under if."		closed	Internationalization	1.1		fixed		janos@…	Accepted	1	0	1	0	0	0
