Hi Ramiro, On 09/27/2014 06:13 AM, Ramiro Morales wrote: > The names of directories with translations on disk are actually GNU > gettext locale names[1] as opposed to language names[1] (the ones in > the Accept-Language HTTP header and discussed above.) > > It does specify that the part after the underscore separator must be a > ISO 3166 country code. See [2] and [3]. > > So, for me, this indicates Django current behavior with these file > system dir names is correct. But perhaps I'm missing something?
Nope, I was the one missing just not one, but several things. Not only the distinction between the two types of names, but the obvious call to `.lower()` in `parse_accept_lang_header()`. My bad; clearly should have explored more deeply before posting. Thanks for the corrections! > 1. https://docs.djangoproject.com/en/dev/topics/i18n/#definitions I do notice that this bit of documentation asserts that a language code "Represents the name of a language. Browsers send the names of the languages they accept in the Accept-Language HTTP header using this format. Examples: it, de-at, es, pt-br. Both the language and the country parts are in lower case." It seems misleading to say that browsers send Accept-Language in "this format" and then say that both parts in this format "are in lower case". Do you think this paragraph should be updated to clarify that the Accept-Language header is actually handled case-insensitively? Carl -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/54299AA0.6070309%40oddbird.net. For more options, visit https://groups.google.com/d/optout.
