import java.util.Locale;
publicclass Main {
publicstaticvoid main(String[] argv) throws Exception {
Locale[] locales = Locale.getAvailableLocales();
for (int i = 0; i < locales.length; i++) {
// Get the 2-letter language code
String language = locales[i].getLanguage();
}
}
}