Java Tutorial/I18N/Country Codes
Версия от 17:44, 31 мая 2010; (обсуждение)
Country Language Codes
import java.util.Locale;
public class CountryLanguageCodes {
public static void main(String [] argv) {
String [] countries = Locale.getISOCountries();
String [] languages = Locale.getISOLanguages();
int i;
System.out.println("\nCountries:\n");
for (i = 0; i < countries.length; i++)
System.out.println(countries[i]);
System.out.println("\nLanguages:\n");
for (i = 0; i < languages.length; i++)
System.out.println(languages[i]);
}
}
Examples of ISO ountry Codes
CountryCodeAustraliaAUBrazilBRCanadaCAChinaCNEgyptEGFranceFRGermanyDEIndiaINMexicoMXSwitzerlandCHTaiwanTWUnited KingdomGBUnited StatesUS