-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow four character country code #255
Allow four character country code #255
Conversation
can you add a unit test please? |
468a586
to
4286390
Compare
@BenjaminVanRyseghem done |
now there is only the test 😄 |
I just learn that the ISO convention is @ArmorDarks an opinion? |
@BenjaminVanRyseghem In short, yes, it's like that, you can read in details about it here. So, by GNU Gettext it usually strictly However, on practice it slightly different, because some locales can occur in few "variants". For instance, serbian Pure GNU way to define same would be I can't clearly understand what about this PR, but if it's is compatible with that slight deviation from ISO-only compatible locales, I'm 👍 for it. |
Just to highlight this once again, title of this PR says |
@ArmorDarks sorry yes I am probably using the wrong terminology, but the main goal is to allow e.g. zh-HANS as language code which has 4 chars in the second part |
Is it ok? The intent of this fix is just to make it so that this existing test doesn't fail for e.g. zh-Hans |
ah ok 😄 |
in numbro 1.11.0 |
Btw, finally figured completely is Turns out, it is based on (relatively) new specs IETF BCP 47, which todays becomes de-facto standard and replaces old ISO 369-1, which was quite limited. For instance, BCP 47 declares that locale can have following format:
Script is As turns out, even HTML5 accepts language tag as a valid A bit more info:
Unfortunately, seems that Gettext does not switch to that standard yet and continues to use ISO 639-1 for language and ISO 3166 for region only (so, in Gettext only locales like
But I really hope they switch to BCP 47, since it definately much better geared tower modern standards. MS cultures seems to resemble BCP 47 standard, but I can't tell for sure — it differs from one MS document to another. |
Thanks for the memo. I am all in for leaving behind MS notations as they've proven many times to not be reliable in their "best practices". BCP 47 sounds good. Let's go for it 😄 |
No description provided.