Is there any java (>5) enum for listing european countries and languages somewhere? If there aren't any, I'll probably write them from this list : http://www.nationsonline.org/oneworld/european_languages.htm
But if I could avoid that burden, that would be great!
P.S.: Finally, I'm starting to use the geoNames webservice at geonames.org. For the countries I use this snippet in Groovy :
import org.geonames.*
ToponymSearchCriteria sc = new ToponymSearchCriteria()
sc.setContinentCode("eu")
sc.setFeatureCode("PCLI")
def res = WebService.search(sc)
def countries = res.getToponyms().collect{it.countryName}.sort()
It is unlikely that professional framework designers will include such an Enum in their library, because the set of countries (and the set of politically-recognised official languages) changes all the time. You’d either have to break backwards-compatibility, making the Enum rather useless for software that is supposed to work for longer than a few years, or you’d have to keep old, no-longer-recognised countries and languages in the Enum.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With