當前位置: 首頁>>代碼示例 >>用法及示例精選 >>正文


Java Locale getISOLanguages()用法及代碼示例


Java中的Locale類的getISOLanguages()方法用於獲取ISO 639中定義的所有可用的兩個字母的語言代碼的數組的集合。

用法:

Locale.getISOLanguages()

參數:此方法不帶任何參數。


返回值:此方法返回所有兩個字母的語言代碼的數組集合。

以下示例程序旨在說明getISOLanguages()方法的用法:

// 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]); 
    } 
}
輸出:
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


相關用法


注:本文由純淨天空篩選整理自Chinmoy Lenka大神的英文原創作品 Locale getISOLanguages() Method in Java with Examples。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。