You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@click.apache.org by "Bob Schellink (JIRA)" <ji...@apache.org> on 2011/01/02 09:57:46 UTC
[jira] Resolved: (CLK-740) More countries in
org.apache.click.extras.controlCountrySelect
[ https://issues.apache.org/jira/browse/CLK-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bob Schellink resolved CLK-740.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.3.0-RC1
Assignee: Bob Schellink
thanks, fix checked in
> More countries in org.apache.click.extras.controlCountrySelect
> --------------------------------------------------------------
>
> Key: CLK-740
> URL: https://issues.apache.org/jira/browse/CLK-740
> Project: Click
> Issue Type: Improvement
> Components: extras
> Reporter: Lorenzo Simionato
> Assignee: Bob Schellink
> Priority: Minor
> Fix For: 2.3.0-RC1
>
>
> From the description of CountrySelect it says that
> "The country list is not hardcoded but generated by the JDK, i.e. there's an Option for each country that has a supported Locale from the side of the JDK.".
> In the code the list of countries is obtained in the following way:
> Locale[] availableLocales = Locale.getAvailableLocales();
> for (int i = 0; i < availableLocales.length; i++) {
> final String iso = availableLocales[i].getCountry();
> final String country = availableLocales[i].getDisplayCountry(getLocale());
> ...
> }
> That returns a limited list of countries. We can change this in the following way to obtain a more complete list, that is more useful for example
> in registration forms:
> String[] isoCountries = Locale.getISOCountries();
> for (int i = 0; i < isoCountries.length; i++) {
> Locale locale = new Locale("en", isoCountries[i]);
> final String iso = locale.getCountry();
> final String country = locale.getDisplayCountry(getLocale());
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.