Skip to content
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

fix android generating old language code for ISO 639 #186

Merged
merged 1 commit into from
Jul 12, 2018

Conversation

pilot4u
Copy link
Contributor

@pilot4u pilot4u commented Apr 27, 2018

forLanguageTag not converting old ISO 649 format to new as described :
The language codes "he", "yi", and "id" are mapped to "iw", "ji", and "in" respectively. (This is the same canonicalization that's done in Locale's constructors.)
due to:
ISO 639 is not a stable standard; some of the language codes it defines (specifically "iw", "ji", and "in") have changed. This constructor accepts both the old codes ("iw", "ji", and "in") and the new codes ("he", "yi", and "id"), but all other API on Locale will return only the OLD codes.
this android issue also described here:
https://stackoverflow.com/questions/44245959/android-generating-wrong-language-code-for-indonesia

my workaround is similar to one was implemented for OneSignal project
OneSignal/OneSignal-Android-SDK@7b9caf5

forLanguageTag not converting old ISO 649 format to new as described :
The language codes "he", "yi", and "id" are mapped to "iw", "ji", and "in" respectively. (This is the same canonicalization that's done in Locale's constructors.) 
due to:
ISO 639 is not a stable standard; some of the language codes it defines (specifically "iw", "ji", and "in") have changed. This constructor accepts both the old codes ("iw", "ji", and "in") and the new codes ("he", "yi", and "id"), but all other API on Locale will return only the OLD codes.
this android issue also described here:
https://stackoverflow.com/questions/44245959/android-generating-wrong-language-code-for-indonesia

my workaround is similar to one was implemented for OneSignal project
OneSignal/OneSignal-Android-SDK@7b9caf5
@zoontek zoontek merged commit dcfd1c2 into AlexanderZaytsev:master Jul 12, 2018
@zoontek
Copy link
Collaborator

zoontek commented Jul 12, 2018

Thanks, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants