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

[Improvement] Show country name localized automatically. #11

Open
Ricardo1980 opened this issue Jan 11, 2015 · 2 comments
Open

[Improvement] Show country name localized automatically. #11

Ricardo1980 opened this issue Jan 11, 2015 · 2 comments

Comments

@Ricardo1980
Copy link

Hello!
My Android is in Spanish but I see the country's names in English.
I know you can get all those names localized automatically from the API.

                String[] locales = Locale.getISOCountries();
                for (String countryCode : locales) {
                    Locale obj = new Locale("", countryCode);
                    Log.d("---", "Country Code = " + obj.getCountry() + ", Country Name = " + obj.getDisplayCountry());
                }

This would be a nice improvement and you don't have to write thousands of country names.

@thomasdao
Copy link
Contributor

Thanks @Ricardo1980 that's great improvement, I didn't know this. Will make change to the library when I have some time

@Ricardo1980
Copy link
Author

Curiously, that code doesn't work with "AC" or Ascension Islands. Don't know exactly the reason. Any suggestion?
It seems according ISO 3166 is not a country but a special zone (like european union or canarian islands). Not sure how to cope with this problem.

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

No branches or pull requests

2 participants