Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is en_EN a valid language locale

In the example for internationalization at JavaFX 2 and Internationalization the locale passed is resolved as en_EN. Is it even a valid locale?

like image 403
Rajeev Shukla Avatar asked Jul 27 '15 10:07

Rajeev Shukla


1 Answers

See Enabled Locales for java.util and java.text Functionality for a list of all supported locales by Oracle's JDK 8 and the JRE 8.

The language tag en-EN is not listed.

That's because the string given as the country code ("EN") is not an assigned ISO 3166 alpha-2 country code (see Locale, "country (region)").

A list of all 2-letter country codes defined in ISO 3166 can be retrieved with Locale.getISOCountries().

like image 159
Modus Tollens Avatar answered Oct 30 '22 01:10

Modus Tollens