#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     |       Keywords:  i18n, inconsistency
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 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.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29348>
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/049.1fe82d7a61bae35803479d288a484c91%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to