Open In App

Locale getISOLanguages() Method in Java with Examples

Last Updated : 27 Dec, 2018
Improve
Improve
Like Article
Like
Save
Share
Report

The getISOLanguages() Method of Locale class in Java is used get the collection of arrays of all available two-letter language codes defined in ISO 639.

Syntax:

Locale.getISOLanguages()

Parameters: This method does not take any parameters.

Return Value: This method returns the array collection of all two-letter language codes.

Below program illustrates the working of getISOLanguages() method:




// Java code to illustrate getISOCountries() method
  
import java.util.*;
  
public class Locale_Demo {
    public static void main(String[] args)
    {
  
        // Creating a new locale
        String[] langugae_list
            = Locale.getISOLanguages();
  
        // Displaying all the language codes
        System.out.println("Below is the list"
                           + " of all the language code"
                           + " defined in ISO 639.");
  
        for (int i = 0; i < langugae_list.length; i++)
            System.out.println(i + ":" + langugae_list[i]);
    }
}


Output:

Below is the list of all the language code
0:aa
1:ab
2:ae
3:af
4:ak
5:am
6:an
7:ar
8:as
9:av
10:ay
11:az
12:ba
13:be
14:bg
15:bh
16:bi
17:bm
18:bn
19:bo
20:br
21:bs
22:ca
23:ce
24:ch
25:co
26:cr
27:cs
28:cu
29:cv
30:cy
31:da
32:de
33:dv
34:dz
35:ee
36:el
37:en
38:eo
39:es
40:et
41:eu
42:fa
43:ff
44:fi
45:fj
46:fo
47:fr
48:fy
49:ga
50:gd
51:gl
52:gn
53:gu
54:gv
55:ha
56:he
57:hi
58:ho
59:hr
60:ht
61:hu
62:hy
63:hz
64:ia
65:id
66:ie
67:ig
68:ii
69:ik
70:in
71:io
72:is
73:it
74:iu
75:iw
76:ja
77:ji
78:jv
79:ka
80:kg
81:ki
82:kj
83:kk
84:kl
85:km
86:kn
87:ko
88:kr
89:ks
90:ku
91:kv
92:kw
93:ky
94:la
95:lb
96:lg
97:li
98:ln
99:lo
100:lt
101:lu
102:lv
103:mg
104:mh
105:mi
106:mk
107:ml
108:mn
109:mo
110:mr
111:ms
112:mt
113:my
114:na
115:nb
116:nd
117:ne
118:ng
119:nl
120:nn
121:no
122:nr
123:nv
124:ny
125:oc
126:oj
127:om
128:or
129:os
130:pa
131:pi
132:pl
133:ps
134:pt
135:qu
136:rm
137:rn
138:ro
139:ru
140:rw
141:sa
142:sc
143:sd
144:se
145:sg
146:si
147:sk
148:sl
149:sm
150:sn
151:so
152:sq
153:sr
154:ss
155:st
156:su
157:sv
158:sw
159:ta
160:te
161:tg
162:th
163:ti
164:tk
165:tl
166:tn
167:to
168:tr
169:ts
170:tt
171:tw
172:ty
173:ug
174:uk
175:ur
176:uz
177:ve
178:vi
179:vo
180:wa
181:wo
182:xh
183:yi
184:yo
185:za
186:zh
187:zu

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads