You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Norwegian code (no) translations are missing #53036
We support Bokmål as the standard code nb. We don't support Nynorsk (nn).
Are you asking for Nynorsk translations? Or?
There's not really a language code no.
It would be Bokmål. I think the keyword here was "Google-canonical". When Google says no, they mean nb.
Would you be comfortable having Flutter localization delegates to use this alternative code as well and map it to nb or do you prefer this to be google3 specific?
The deprecated Android/Java locales are modernized test, in packages/flutter_localizations/test/override_test.dart, verifies that we map some obsolete locale names to their modern equivalents, but it doesn't cover no (which we supported a few years ago - #17788). It looks like no isn't a "Google-canonical" issue, it's another Java issue - http://www.localeplanet.com/java/no-NO/index.html. So perhaps we should automatically convert no to nb.
Based on my current understanding, nb, no, and nn are distinct locales according to ISO 639. It seems like the original transition from no to nb was necessary because Android devices use recognize nb and not no.
However, as @HansMuller has pointed out, Google's translations for nb and no are essentially identical.
We could solve this problem by adding logic to generate nb localization delegates off of _no.arb when _nb.arb is not present. This would allow us to handle nb for Android devices, as well as correctly pulling down the _no.arb files without having to do the manual change from _no.arb to _nb.arb.
I'm going to share some relevant context from discussing with the i18n experts:
For Android `no` is never used.
Before Android N there was no way for a user to select `nn`, only `nb`
Starting with Android N one can select `nb` and / or `nn`.
There are no fallbacks or aliases, they behave as different languages
(but no can never be selected in user settings)
...
In general no is not recommended, as it is ambiguous.
IANA lists it as a macrolanguage, with nb and nn as "members"
If one has to do a "naive" mapping then it might map no == nb
A better mapping might interpret no as "some kind of Norwegian", so it might
match both (giving priority to nb if both exist)
LanguageMatcher is does "the better mapping", but it is not used in Android.
So in theory no could be used to indicate Norwegian in any form, eg. spoken or
written as nb or written as nn.
In practice Bokmål is the preferred written form for 90% of the population of
Norway, so for a lot of people and for a lot of software the language codes no
and nb are simply taken to mean exactly the same thing.
My intention is to have no and nb be synonyms for now, since Android only recognizes nb vs nn.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Hixie commentedon Mar 24, 2020
We support Bokmål as the standard code
nb. We don't support Nynorsk (nn).Are you asking for Nynorsk translations? Or?
There's not really a language code
no.mehmetf commentedon Mar 25, 2020
It would be Bokmål. I think the keyword here was "Google-canonical". When Google says
no, they meannb.Would you be comfortable having Flutter localization delegates to use this alternative code as well and map it to
nbor do you prefer this to be google3 specific?HansMuller commentedon Mar 25, 2020
The
deprecated Android/Java locales are modernizedtest, in packages/flutter_localizations/test/override_test.dart, verifies that we map some obsolete locale names to their modern equivalents, but it doesn't coverno(which we supported a few years ago - #17788). It looks likenoisn't a "Google-canonical" issue, it's another Java issue - http://www.localeplanet.com/java/no-NO/index.html. So perhaps we should automatically convertnotonb.HansMuller commentedon Mar 25, 2020
CC @shihaohong
HansMuller commentedon Mar 30, 2020
It looks like we've been incorrectly leaving out the 'no' (Norsk) locale, see https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes
Even though Google's translations for 'nb' and 'no' are typically identical, it should be a supported locale per https://api.flutter.dev/flutter/flutter_localizations/GlobalMaterialLocalizations-class.html
shihaohong commentedon Mar 30, 2020
Based on my current understanding,
nb,no, andnnare distinct locales according to ISO 639. It seems like the original transition fromnotonbwas necessary because Android devices use recognizenband notno.However, as @HansMuller has pointed out, Google's translations for
nbandnoare essentially identical.We could solve this problem by adding logic to generate
nblocalization delegates off of_no.arbwhen_nb.arbis not present. This would allow us to handlenbfor Android devices, as well as correctly pulling down the_no.arbfiles without having to do the manual change from_no.arbto_nb.arb.Hixie commentedon Mar 31, 2020
I don't have a strong opinion here. If we want to support no and nb as synonyms that works for me.
shihaohong commentedon Apr 2, 2020
I'm going to share some relevant context from discussing with the i18n experts:
My intention is to have
noandnbbe synonyms for now, since Android only recognizesnbvsnn.lock commentedon Apr 18, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.