#11068 closed (fixed)
Wrong language code for Norwegian (Bokmål)
Reported by: | Nils Fredrik Gjerull | Owned by: | Jannis Leidel |
---|---|---|---|
Component: | Internationalization | Version: | dev |
Severity: | Keywords: | language_code norwegian | |
Cc: | jon@… | Triage Stage: | Fixed on a branch |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
According to the The GNU gettext manual the language code for Norwegian bokmål have changed from 'no' to 'nb'. In Django the language code used is 'no'. This should be renamed to 'nb', if there is not a very good reason not to.
As a intermediate measure it is perhaps a good idea to set LANGUAGE_CODE = 'nb:no' in settings.py if you use Norwegian, then both language codes would be searched for translations. Perhaps this should be mentioned in the Internationalization documentation somewhere? Perhaps a section about language codes? I can make a documentation patch for it.
Change History (11)
comment:1 by , 15 years ago
Version: | 1.0 → SVN |
---|
comment:2 by , 15 years ago
Cc: | added |
---|---|
Owner: | changed from | to
comment:3 by , 15 years ago
The reporter is correct. Norwegian (no) is commonly used when describing Norwegian-Bokmal (nb), as it is the main language used in Norway. The translation that is currently residing in Django is a Norwegian-Bokmal (nb) translation. The right thing to do would be to rename the current translation to nb.
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:5 by , 15 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Triage Stage: | Unreviewed → Fixed on a branch |
comment:6 by , 15 years ago
Owner: | changed from | to
---|---|
Status: | reopened → new |
comment:7 by , 15 years ago
Status: | new → assigned |
---|
So what would be a sane way to handle this and maintain backwards compatibility?
comment:8 by , 15 years ago
Probably, if we copy the translation to 'nb', without removing the one in 'no'.
That way, it would work ok when the language is set correctly, but it will go on working for projects that already has set the 'no' language.
Does it sound ok, or am I missing something?
comment:9 by , 15 years ago
milestone: | → 1.2 |
---|
If the language code has changed, we should update our code. After discussing with jezdez on IRC, we will
- copy no->nb
- put a note in the no translation file that nb should be updated, not no
- Modify django.utils.translation to raise a warning if the no translation is requested
- Update the deprecation notes and release notes to indicate the change.
comment:10 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I don't know much about Norwegian languages, but it looks like Norwegian (no) and Norwegian-Bokmal (nb) are different languages. So now, translations in django/conf/locale/no/LC_MESSAGES are for Norwegian-Bokmal, that is incorrect, right?
So the solution would be just renaming the directory from no to nb, so you'll have translations to Norwegian-Bokmal but not Norwegian. Is it ok?
I'm CC the last translator to Norwegian, to validate that there is a mistake on it.