Java Locale getISOLanguages() Example
Locale class getISOLanguages() method example. This example shows you how to use getISOLanguages() method.
Syntax is : public static String[] getISOLanguages()
Method returns a list of all 2-letter language codes defined in ISO 639. Can be used to create Locales. [NOTE: ISO 639 is not a stable
standard-- some languages' codes have changed. The list this function returns includes both the new and the old codes for the languages whose codes have changed.]
Here is the code.
/**
* @(#) GetISOLanguagesLocale.java
* A class representing use of method getISOLanguages() of Locale class
in java.util Package.
* @Version 24-May-2008
* @author Rose India Team
*/
import java.util.*;
class GetISOLanguagesLocale {
public static void main( String args[] ){
// getISOLanguages() method call. This is static method.
String[] strArray = Locale.getISOLanguages();
System.out.print("## List of all 2-letter language code in ISO 3166.");
for (int i=0; i<strArray.length; i++ )
{
System.out.println(strArray[i]);
}
}
} |
Output of the program.
## List of all 2-letter language code in ISO 3166.
aa ab ae af ak am an ar as av ay az ba be bg bh bi bm bn bo br bs ca ce ch co cr cs cu cv cy da de dv dz ee el en eo es et eu fa ff fi fj fo fr fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik in io is it iu iw ja ji jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn no nr nv ny oc oj om or os pa pi pl ps pt qu rm rn ro ru rw sa sc sd se sg si sk sl sm sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zu |
|