Description
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());
}