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: Country name in locales #19

Open
Alexuy opened this issue Jun 16, 2014 · 2 comments
Open

Improvement: Country name in locales #19

Alexuy opened this issue Jun 16, 2014 · 2 comments

Comments

@Alexuy
Copy link

Alexuy commented Jun 16, 2014

Now for get display country name i must wite something like this:

String countryName = new Locale("", countryCode).getDisplayCountry(systemConfig.getLocale());

In JDK class Locale there is translates country names for some languages (English, Russian), but not all.

I use CountryCode, but for display country name i must use class Locale.

@TakahikoKawasaki
Copy link
Owner

CountryCode has toLocale() method, so instead of calling new Locale("", countryCode), you can write the code like below.

CountryCode countryCode = ...;
String countryName = countryCode.toLocale().getDisplayCountry(systemConfig.getLocale());

Doesn't this help? Or do you mean that CountryCode should have getDisplayCountry() / getDisplayCountry(Locale) methods?

@Alexuy
Copy link
Author

Alexuy commented Jun 17, 2014

yes. I mean in lib must be properties files for some locales. Because JDK have not all countries and not all countries have translation for other languages

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