Java Locale getAvailableLocales() method

The getAvailableLocales() method of Java Locale class is used to return an array of all installed locales. The returned array represents the union of locales which is supported by installed LocaleServiceProvider implementations and by the Java runtime environment.

Syntax

Parameter

NA

Return

This method returns an array of installed locales.

Example 1

Output:

Installed locales are:
0:
1:nn
2:ar_JO
3:bg
4:kea
5:zu
6:am_ET
7:fr_DZ
8:ti_ET
9:bo_CN
10:hsb
11:qu_EC
12:ta_SG
13:lv
14:en_NU
15:zh_SG_#Hans
16:en_MS
17:en_GG
18:en_JM
19:vo
20:kkj
21:sr_ME
22:sv_SE
23:es_BO
24:dz_BT
25:mer
26:sah
27:en_ZM
28:fr_ML
29:br
30:ha_NG
31:ar_SA
32:bs_BA
33:fa_AF
34:dsb_DE
35:sk
36:os_GE
37:ml
38:en_MT
39:en_LR
40:ar_TD
41:en_GH
42:en_IL
43:sv
44:cs
45:el
46:tzm_MA
47:af
48:sw_UG
49:ses_ML
50:smn
51:tk_TM
52:sr_ME_#Cyrl
53:ar_EG
54:dsb
55:lkt_US
56:vai_LR_#Latn
57:ji_001
58:yo_NG
59:se_NO
60:khq
61:sw_CD
62:vo_001
63:en_PW
64:pl_PL
65:fil_PH
66:sr_CS
67:ne_IN
68:es_PH
69:es_ES
70:es_CO
71:bg_BG
72:ji
73:ar_EH
74:bs_BA_#Latn
75:en_VC
76:nb_SJ
77:es_US
78:agq
79:hsb_DE
80:en_US_POSIX
81:en_150
82:ar_SD
83:en_KN
84:ha_NE
85:pt_MO
86:ebu
87:ro_RO
88:zh__#Hans
89:lb_LU
90:sr_ME_#Latn
91:es_GT
92:so_KE
93:dje_NE
94:bas_CM
95:fr_PM
96:ar_KM
97:fr_MG
98:no_NO_NY
99:es_CL
100:mn
101:agq_CM
102:kam_KE
103:teo
104:tr_TR
105:eu
106:fa_IR
107:en_MO
108:shi__#Tfng
109:en_BZ
110:sq_AL
111:ar_MR
112:es_DO
113:ru
114:twq_NE
115:az
116:nmg_CM
117:fa
118:kl_GL
119:en_NR
120:nd
121:kk
122:az__#Cyrl
123:en_MP
124:en_GD
125:tk
126:hy
127:shi__#Latn
128:en_BW
129:en_AU
130:en_CY
131:kab_DZ
132:kde_TZ
133:ta_MY
134:ti_ER
135:nus_SS
136:en_RW
137:nd_ZW
138:sv_FI
139:ksb
140:luo
141:lb
142:ne
143:en_IE
144:zh_SG
145:ln_CD
146:en_KI
147:nnh_CM
148:om_ET
149:no
150:ja_JP
151:my
152:ka
153:ar_IL
154:mgh
155:or_IN
156:fr_MF
157:shi
158:kl
159:yue_HK
160:en_SZ
161:rwk_TZ
162:zh
163:es_PE
164:mgh_MZ
165:saq
166:az__#Latn
167:ta
168:en_GB
169:lag
170:zh_HK_#Hant
171:ar_SY
172:ksf_CM
173:bo
174:kk_KZ
175:es_PA
176:om_KE
177:ar_PS
178:en_AS
179:fr_VU
180:zh_TW
181:bez
182:kln
183:fr_MC
184:kw
185:pt_MZ
186:fr_NE
187:vai__#Latn
188:ksb_TZ
189:ksh
190:ur_IN
191:ln
192:en_JE
193:gsw_CH
194:ln_CF
195:uz_AF
196:en_CX
197:luy_KE
198:pt
199:en_AT
200:gl
201:kkj_CM
202:sr__#Cyrl
203:es_GQ
204:kn_IN
205:ar_YE
206:to
207:en_SX
208:ga
209:qu
210:ru_KZ
211:en_TZ
212:et
213:en_PR
214:mua
215:ko_KP
216:in
217:ps
218:sn
219:nl_SR
220:rof
221:en_BS
222:km
223:zgh
224:fr_NC
225:be
226:gv
227:es
228:dua
229:gd_GB
230:jgo
231:nl_BQ
232:fr_CM
233:gsw
234:uz_UZ_#Cyrl
235:pa_IN_#Guru
236:en_KE
237:guz
238:mfe
239:asa_TZ
240:teo_UG
241:ja
242:fr_SN
243:or
244:brx

Example 2

Output:

Installed locales are :
1:nn
2:ar_JO
3:bg
4:kea
5:zu
6:am_ET
7:fr_DZ
8:ti_ET
9:bo_CN
10:hsb
11:qu_EC
12:ta_SG
13:lv
14:en_NU
15:zh_SG_#Hans
16:en_MS
17:en_GG
18:en_JM
19:vo
20:kkj
21:sr_ME
22:sv_SE
23:es_BO
24:dz_BT
25:mer
26:sah
27:en_ZM
28:fr_ML
29:br
30:ha_NG
31:ar_SA
32:bs_BA
33:fa_AF
34:dsb_DE
35:sk
36:os_GE
37:ml
38:en_MT
39:en_LR
40:ar_TD
41:en_GH
42:en_IL
43:sv
44:cs
45:el
46:tzm_MA
47:af
48:sw_UG
49:ses_ML
50:smn
51:tk_TM
52:sr_ME_#Cyrl
53:ar_EG
54:dsb
55:lkt_US
56:vai_LR_#Latn
57:ji_001
58:yo_NG
59:se_NO
60:khq
61:sw_CD
62:vo_001
63:en_PW
64:pl_PL
65:fil_PH
66:sr_CS
67:ne_IN
68:es_PH
69:es_ES
70:es_CO
71:bg_BG
72:ji