|
1 |
| -' The following code example displays several properties of the neutral cultures. |
2 |
| - |
3 |
| -' <snippet1> |
4 |
| -ImportsSystem.Globalization |
| 1 | +ImportsSystem.Globalization |
5 | 2 |
|
6 | 3 | ModuleModule1
|
7 | 4 |
|
8 |
| -PublicSubMain() |
9 |
| - |
10 |
| -' Displays several properties of the neutral cultures. |
11 |
| -Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME") |
12 |
| -DimciAsCultureInfo |
13 |
| -ForEachciInCultureInfo.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 |
| -Nextci |
21 |
| - |
22 |
| -EndSub |
23 |
| - |
24 |
| - |
25 |
| - |
26 |
| -'This code produces the following output. This output has been cropped for brevity. |
27 |
| -' |
28 |
| -'CULTURE ISO ISO WIN DISPLAYNAMEENGLISHNAME |
29 |
| -'arar ara ARA ArabicArabic |
30 |
| -'bgbg bul BGR BulgarianBulgarian |
31 |
| -'caca cat CAT CatalanCatalan |
32 |
| -'cscs ces CSY CzechCzech |
33 |
| -'dada dan DAN DanishDanish |
34 |
| -'dede deu DEU GermanGerman |
35 |
| -'elel ell ELL GreekGreek |
36 |
| -'enen eng ENU EnglishEnglish |
37 |
| -'eses spa ESP Spanish Spanish |
38 |
| -'fifi fin FIN Finnish Finnish |
39 |
| -'zhzh 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 | +PublicSubRunIt() |
| 6 | +' <snippet1> |
| 7 | + |
| 8 | +' Displays several properties of the neutral cultures. |
| 9 | +Console.WriteLine("CULTURE ISO ISO WIN DISPLAYNAME ENGLISHNAME") |
| 10 | +DimciAsCultureInfo |
| 11 | +ForEachciInCultureInfo.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 | +Nextci |
| 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 | +'cscs ces CSY CzechCzech |
| 27 | +'dada dan DAN DanishDanish |
| 28 | +'dede deu DEU GermanGerman |
| 29 | +'elel ell ELL GreekGreek |
| 30 | +'enen eng ENU EnglishEnglish |
| 31 | +'eses spa ESP SpanishSpanish |
| 32 | +'fifi fin FIN FinnishFinnish |
| 33 | +'zhzh zho CHS ChineseChinese |
| 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 | +EndSub |
44 | 41 |
|
45 | 42 | EndModule
|
46 |
| -' </snippet1> |