#29348: "-" and "_" in language code should be consistent
-------------------------------------+-------------------------------------
Reporter: Shen Li | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: | Version: 2.0
Internationalization |
Severity: Normal | Resolution:
Keywords: i18n, inconsistency | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Shen Li:
Old description:
> for some languages eg, en-us hyphen is used
> but in zh_hans underscore is used.
>
> If zh-hans is used, django would not show the translation. Here's some
> tests and resutls
>
> Language code: zh_hans, folder zh_hans -> works
> Language code: zh_hans, folder zh-hans -> ` No translation files found
> for default language zh_hans.`
> Language code: zh-hans, folder zh-hans -> does not work. No errors, no
> translations
> Language code: zh-hans, folder zh_hans -> does not work. No erros, no
> translations
>
> looks like django does not treat zh-hans as a valid language code, which
> is very very confusing because the default en-us is valid.
> It look me a very long time to figure this out.
New description:
for some languages eg, en-us hyphen is used
but in zh_hans underscore is used.
If zh-hans is used, django would not show the translation. Here's some
tests and resutls
Language code: zh_hans, folder zh_hans -> works
Language code: zh_hans, folder zh-hans -> ` No translation files found
for default language zh_hans.`
Language code: zh-hans, folder zh-hans -> does not work. No errors, no
translations
Language code: zh-hans, folder zh_hans -> does not work. No erros, no
translations
looks like django does not treat zh-hans as a valid language code, which
is very very confusing because the default en-us is valid.
It look me a very long time to figure this out.
Edit: even zh_hans is not working with browser language detection, the
folder has to be named 'zh_Hans' even though request.LANGUAGE is 'zh-hans'
is there somether in the doc that pointed this out?
--
--
Ticket URL: <https://code.djangoproject.com/ticket/29348#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/064.20ef224954bed0984a37b85241f154c0%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.