|
1 |
| -' The following code example displays several properties of the neutral cultures. |
2 |
| - |
3 |
| -' <snippet1> |
4 |
| -Imports System.Globalization |
| 1 | +Imports System.Globalization |
5 | 2 |
|
6 | 3 | Module Module1
|
7 | 4 |
|
8 |
| - Public Sub Main() |
9 |
| - |
10 |
| - ' Displays several properties of the neutral cultures. |
11 |
| - Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME") |
12 |
| - Dim ci As CultureInfo |
13 |
| - For Each ci In CultureInfo.GetCultures(CultureTypes.NeutralCultures) |
14 |
| - Console.Write("{0,-7}", ci.Name) |
15 |
| - Console.Write(" {0,-3}", ci.TwoLetterISOLanguageName) |
16 |
| - Console.Write(" {0,-3}", ci.ThreeLetterISOLanguageName) |
17 |
| - Console.Write(" {0,-3}", ci.ThreeLetterWindowsLanguageName) |
18 |
| - Console.Write(" {0,-40}", ci.DisplayName) |
19 |
| - Console.WriteLine(" {0,-40}", ci.EnglishName) |
20 |
| - Next ci |
21 |
| - |
22 |
| - End Sub |
23 |
| - |
24 |
| - |
25 |
| - |
26 |
| -'This code produces the following output. This output has been cropped for brevity. |
27 |
| -' |
28 |
| -'CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME |
29 |
| -'ar ar ara ARA Arabic Arabic |
30 |
| -'bg bg bul BGR Bulgarian Bulgarian |
31 |
| -'ca ca cat CAT Catalan Catalan |
32 |
| -'cs cs ces CSY Czech Czech |
33 |
| -'da da dan DAN Danish Danish |
34 |
| -'de de deu DEU German German |
35 |
| -'el el ell ELL Greek Greek |
36 |
| -'en en eng ENU English English |
37 |
| -'es es spa ESP Spanish Spanish |
38 |
| -'fi fi fin FIN Finnish Finnish |
39 |
| -'zh zh zho CHS Chinese Chinese |
40 |
| -'zh-Hans zh zho CHS Chinese (Simplified) Chinese (Simplified) |
41 |
| -'zh-Hant zh zho ZHH Chinese (Traditional) Chinese (Traditional) |
42 |
| -' |
43 |
| -'Note: zh-Hant returns ZHH when using ICU (default). When NLS mode is enabled, it returns CHT. |
| 5 | + Public Sub RunIt() |
| 6 | + ' <snippet1> |
| 7 | + |
| 8 | + ' Displays several properties of the neutral cultures. |
| 9 | + Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME") |
| 10 | + Dim ci As CultureInfo |
| 11 | + For Each ci In CultureInfo.GetCultures(CultureTypes.NeutralCultures) |
| 12 | + Console.Write("{0,-7}", ci.Name) |
| 13 | + Console.Write(" {0,-3}", ci.TwoLetterISOLanguageName) |
| 14 | + Console.Write(" {0,-3}", ci.ThreeLetterISOLanguageName) |
| 15 | + Console.Write(" {0,-3}", ci.ThreeLetterWindowsLanguageName) |
| 16 | + Console.Write(" {0,-40}", ci.DisplayName) |
| 17 | + Console.WriteLine(" {0,-40}", ci.EnglishName) |
| 18 | + Next ci |
| 19 | + |
| 20 | + 'This code produces the following output. This output has been cropped for brevity. |
| 21 | + ' |
| 22 | + 'CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME |
| 23 | + 'ar ar ara ARA Arabic Arabic |
| 24 | + 'bg bg bul BGR Bulgarian Bulgarian |
| 25 | + 'ca ca cat CAT Catalan Catalan |
| 26 | + 'cs cs ces CSY Czech Czech |
| 27 | + 'da da dan DAN Danish Danish |
| 28 | + 'de de deu DEU German German |
| 29 | + 'el el ell ELL Greek Greek |
| 30 | + 'en en eng ENU English English |
| 31 | + 'es es spa ESP Spanish Spanish |
| 32 | + 'fi fi fin FIN Finnish Finnish |
| 33 | + 'zh zh zho CHS Chinese Chinese |
| 34 | + 'zh-Hans zh zho CHS Chinese (Simplified) Chinese (Simplified) |
| 35 | + 'zh-Hant zh zho ZHH Chinese (Traditional) Chinese (Traditional) |
| 36 | + ' |
| 37 | + 'Note: zh-Hant returns ZHH when using ICU (default). When NLS mode is enabled, it returns CHT. |
| 38 | + |
| 39 | + ' </snippet1> |
| 40 | + End Sub |
44 | 41 |
|
45 | 42 | End Module
|
46 |
| -' </snippet1> |
0 commit comments