Use all available culture type to format Date and currency : CultureInfo « I18N Internationlization « VB.Net Tutorial






Imports System
Imports System.Data
Imports System.Globalization

Public Class Tester
    Public Shared Sub Main
    
        Dim amount As Double = 4.52
        Dim _date As DateTime = DateTime.Now

        Dim info As CultureInfo
        For Each info In CultureInfo.GetCultures(CultureTypes.AllCultures)
            Console.WriteLine(info.EnglishName)
            Console.WriteLine(info.Name)
            If Not info.IsNeutralCulture Then
                Console.WriteLine(amount.ToString("C", info.NumberFormat))
                Console.WriteLine(_date.ToString("d", info.DateTimeFormat))
            End If
        Next
    End Sub

End Class
Arabic
ar
Bulgarian
bg
Catalan
ca
Chinese (Simplified)
zh-CHS
Czech
cs
Danish
da
German
de
Greek
el
English
en
Spanish
es
Finnish
fi
French
fr
Hebrew
he
Hungarian
hu
Icelandic
is
Italian
it
Japanese
ja
Korean
ko
Dutch
nl
Norwegian
no
Polish
pl
Portuguese
pt
Romanian
ro
Russian
ru
Croatian
hr
Slovak
sk
Albanian
sq
Swedish
sv
Thai
th
Turkish
tr
Urdu
ur
Indonesian
id
Ukrainian
uk
Belarusian
be
Slovenian
sl
Estonian
et
Latvian
lv
Lithuanian
lt
Persian
fa
Vietnamese
vi
Armenian
hy
Azeri
az
Basque
eu
Macedonian
mk
Afrikaans
af
Georgian
ka
Faroese
fo
Hindi
hi
Malay
ms
Kazakh
kk
Kyrgyz
ky
Kiswahili
sw
Uzbek
uz
Tatar
tt
Punjabi
pa
Gujarati
gu
Tamil
ta
Telugu
te
Kannada
kn
Marathi
mr
Sanskrit
sa
Mongolian
mn
Galician
gl
Konkani
kok
Syriac
syr
Divehi
div
Invariant Language (Invariant Country)

¡è4.52
05/11/2007
Arabic (Saudi Arabia)
ar-SA
?.?.? 4.52
24/04/28
Bulgarian (Bulgaria)
bg-BG
4,52 §�§Ó
11.5.2007 §Ô.
Catalan (Catalan)
ca-ES
4,52 €
11/05/2007
Chinese (Taiwan)
zh-TW
NT$4.52
2007/5/11
Czech (Czech Republic)
cs-CZ
4,52 K?
11.5.2007
Danish (Denmark)
da-DK
kr 4,52
11-05-2007
German (Germany)
de-DE
4,52 €
11.05.2007
Greek (Greece)
el-GR
4,52 €
11/5/2007
English (United States)
en-US
$4.52
5/11/2007
Finnish (Finland)
fi-FI
4,52 €
11.5.2007
French (France)
fr-FR
4,52 €
11/05/2007
Hebrew (Israel)
he-IL
? 4.52
11/05/2007
Hungarian (Hungary)
hu-HU
4,52 Ft
2007. 05. 11.
Icelandic (Iceland)
is-IS
5 kr.
11.5.2007
Italian (Italy)
it-IT
€ 4,52
11/05/2007
Japanese (Japan)
ja-JP
£¤5
2007/05/11
Korean (Korea)
ko-KR
?5
2007-05-11
Dutch (Netherlands)
nl-NL
€ 4,52
11-5-2007
Norwegian, Bokm?l (Norway)
nb-NO
kr 4,52
11.05.2007
Polish (Poland)
pl-PL
4,52 z?
2007-05-11
Portuguese (Brazil)
pt-BR
R$ 4,52
11/5/2007
Romanian (Romania)
ro-RO
4,52 lei
11.05.2007
Russian (Russia)
ru-RU
4,52§â.
11.05.2007
Croatian (Croatia)
hr-HR
4,52 kn
11.5.2007
Slovak (Slovakia)
sk-SK
4,52 Sk
11. 5. 2007
Albanian (Albania)
sq-AL
4,52Lek
2007-05-11
Swedish (Sweden)
sv-SE
4,52 kr
2007-05-11
Thai (Thailand)
th-TH
?4.52
11/5/2550
Turkish (Turkey)
tr-TR
4,52 YTL
11.05.2007
Urdu (Islamic Republic of Pakistan)
ur-PK
Rs4.52
11/05/2007
Indonesian (Indonesia)
id-ID
Rp5
11/05/2007
Ukrainian (Ukraine)
uk-UA
4,52 §Ô§â§ß.
11.05.2007
Belarusian (Belarus)
be-BY
4,52 §â.
11.05.2007
Slovenian (Slovenia)
sl-SI
4,52 SIT
11.5.2007
Estonian (Estonia)
et-EE
4.52 kr
11.05.2007
Latvian (Latvia)
lv-LV
Ls 4,52
2007.05.11.
Lithuanian (Lithuania)
lt-LT
4,52 Lt
2007.05.11
Persian (Iran)
fa-IR
???? 4/52
5/11/2007
Vietnamese (Vietnam)
vi-VN
4,52 ?
11/05/2007
Armenian (Armenia)
hy-AM
4.52 ??.
11.05.2007
Azeri (Latin, Azerbaijan)
az-AZ-Latn
4,52 man.
11.05.2007
Basque (Basque)
eu-ES
4,52 €
2007/05/11
Macedonian (Former Yugoslav Republic of Macedonia)
mk-MK
4,52 §Õ§Ö§ß.
11.05.2007
Afrikaans (South Africa)
af-ZA
R 4.52
2007/05/11
Georgian (Georgia)
ka-GE
4,52 Lari
11.05.2007
Faroese (Faroe Islands)
fo-FO
kr 4,52
11-05-2007
Hindi (India)
hi-IN
?? 4.52
11-05-2007
Malay (Malaysia)
ms-MY
R5
11/05/2007
Kazakh (Kazakhstan)
kk-KZ
§´4-52
11.05.2007
Kyrgyz (Kyrgyzstan)
ky-KG
4-52 §ã§à§Þ
11.05.07
Kiswahili (Kenya)
sw-KE
S4.52
5/11/2007
Uzbek (Latin, Uzbekistan)
uz-UZ-Latn
5 su'm
11/05 2007
Tatar (Russia)
tt-RU
4,52 §â.
11.05.2007
Punjabi (India)
pa-IN
?? 4.52
11-05-07
Gujarati (India)
gu-IN
?? 4.52
11-05-07
Tamil (India)
ta-IN
?? 4.52
11-05-2007
Telugu (India)
te-IN
?? 4.52
11-05-07
Kannada (India)
kn-IN
?? 4.52
11-05-07
Marathi (India)
mr-IN
?? 4.52
11-05-2007
Sanskrit (India)
sa-IN
?? 4.52
11-05-2007
Mongolian (Cyrillic, Mongolia)
mn-MN
4,52?
07.05.11
Galician (Galician)
gl-ES
4,52 €
11/05/07
Konkani (India)
kok-IN
?? 4.52
11-05-2007
Syriac (Syria)
syr-SY
?.?.? 4.52
11/05/2007
Divehi (Maldives)
div-MV
4.52 ?.
24/04/28
Arabic (Iraq)
ar-IQ
?.?.? 4.52
11/05/2007
Chinese (People's Republic of China)
zh-CN
£¤4.52
2007/5/11
German (Switzerland)
de-CH
SFr. 4.52
11.05.2007
English (United Kingdom)
en-GB
¡ê4.52
11/05/2007
Spanish (Mexico)
es-MX
$4.52
11/05/2007
French (Belgium)
fr-BE
€ 4,52
11/05/2007
Italian (Switzerland)
it-CH
SFr. 4.52
11.05.2007
Dutch (Belgium)
nl-BE
€ 4,52
11/05/2007
Norwegian, Nynorsk (Norway)
nn-NO
kr 4,52
11.05.2007
Portuguese (Portugal)
pt-PT
4,52 €
11-05-2007
Serbian (Latin, Serbia and Montenegro)
sr-SP-Latn
4,52 Din.
11.5.2007
Swedish (Finland)
sv-FI
4,52 €
11.5.2007
Azeri (Cyrillic, Azerbaijan)
az-AZ-Cyrl
4,52 §Þ§Ñ§ß.
11.05.2007
Malay (Brunei Darussalam)
ms-BN
$5
11/05/2007
Uzbek (Cyrillic, Uzbekistan)
uz-UZ-Cyrl
4,52 §ã?§Þ
11.05.2007
Arabic (Egypt)
ar-EG
?.?.? 4.520
11/05/2007
Chinese (Hong Kong S.A.R.)
zh-HK
HK$4.52
11/5/2007
German (Austria)
de-AT
€ 4,52
11.05.2007
English (Australia)
en-AU
$4.52
11/05/2007
Spanish (Spain)
es-ES
4,52 €
11/05/2007
French (Canada)
fr-CA
4,52 $
2007-05-11
Serbian (Cyrillic, Serbia and Montenegro)
sr-SP-Cyrl
4,52 §¥§Ú§ß.
11.5.2007
Arabic (Libya)
ar-LY
?.?.? 4.52
11/05/2007
Chinese (Singapore)
zh-SG
$4.52
11/5/2007
German (Luxembourg)
de-LU
4,52 €
11.05.2007
English (Canada)
en-CA
$4.52
11/05/2007
Spanish (Guatemala)
es-GT
Q4.52
11/05/2007
French (Switzerland)
fr-CH
SFr. 4.52
11.05.2007
Arabic (Algeria)
ar-DZ
?.?.? 4.52
11-05-2007
Chinese (Macao S.A.R.)
zh-MO
MOP4.52
11/5/2007
German (Liechtenstein)
de-LI
CHF 4.52
11.05.2007
English (New Zealand)
en-NZ
$4.52
11/05/2007
Spanish (Costa Rica)
es-CR
?4,52
11/05/2007
French (Luxembourg)
fr-LU
4,52 €
11/05/2007
Arabic (Morocco)
ar-MA
?.?.? 4.52
11-05-2007
English (Ireland)
en-IE
€4.52
11/05/2007
Spanish (Panama)
es-PA
B/. 4.52
05/11/2007
French (Principality of Monaco)
fr-MC
4,52 €
11/05/2007
Arabic (Tunisia)
ar-TN
?.?.? 4.520
11-05-2007
English (South Africa)
en-ZA
R 4.52
2007/05/11
Spanish (Dominican Republic)
es-DO
RD$4.52
11/05/2007
Arabic (Oman)
ar-OM
?.?.? 4.52
11/05/2007
English (Jamaica)
en-JM
J$4.52
11/05/2007
Spanish (Venezuela)
es-VE
Bs 4,52
11/05/2007
Arabic (Yemen)
ar-YE
?.?.? 4.52
11/05/2007
English (Caribbean)
en-CB
$4.52
05/11/2007
Spanish (Colombia)
es-CO
$ 4,52
11/05/2007
Arabic (Syria)
ar-SY
?.?.? 4.52
11/05/2007
English (Belize)
en-BZ
BZ$4.52
11/05/2007
Spanish (Peru)
es-PE
S/. 4.52
11/05/2007
Arabic (Jordan)
ar-JO
?.?.? 4.520
11/05/2007
English (Trinidad and Tobago)
en-TT
TT$4.52
11/05/2007
Spanish (Argentina)
es-AR
$ 4,52
11/05/2007
Arabic (Lebanon)
ar-LB
?.?.? 4.52
11/05/2007
English (Zimbabwe)
en-ZW
Z$4.52
5/11/2007
Spanish (Ecuador)
es-EC
$ 4,52
11/05/2007
Arabic (Kuwait)
ar-KW
?.?.? 4.520
11/05/2007
English (Republic of the Philippines)
en-PH
Php4.52
5/11/2007
Spanish (Chile)
es-CL
$ 4,52
11-05-2007
Arabic (U.A.E.)
ar-AE
?.?.? 4.52
11/05/2007
Spanish (Uruguay)
es-UY
$U 4,52
11/05/2007
Arabic (Bahrain)
ar-BH
?.?.? 4.520
11/05/2007
Spanish (Paraguay)
es-PY
Gs 4,52
11/05/2007
Arabic (Qatar)
ar-QA
?.?.? 4.52
11/05/2007
Spanish (Bolivia)
es-BO
$b 4,52
11/05/2007
Spanish (El Salvador)
es-SV
$4.52
11/05/2007
Spanish (Honduras)
es-HN
L. 4.52
11/05/2007
Spanish (Nicaragua)
es-NI
C$ 4.52
11/05/2007
Spanish (Puerto Rico)
es-PR
$ 4.52
11/05/2007
Chinese (Traditional)
zh-CHT
Serbian
sr
Sami (Southern) (Norway)
sma-NO
kr 4,52
11.05.2007
Serbian (Cyrillic) (Bosnia and Herzegovina)
sr-BA-Cyrl
4,52 §¬§®
11.5.2007
Zulu (South Africa)
zu-ZA
R 4.52
2007/05/11
Xhosa (South Africa)
xh-ZA
R 4.52
2007/05/11
Tswana (South Africa)
tn-ZA
R 4.52
2007/05/11
Sami (Northern) (Sweden)
se-SE
4,52 kr
2007-05-11
Sami (Southern) (Sweden)
sma-SE
4,52 kr
2007-05-11
Croatian (Bosnia and Herzegovina)
hr-BA
4,52 KM
11.5.2007
Sami (Inari) (Finland)
smn-FI
4,52 €
11.5.2007
Quechua (Peru)
quz-PE
S/. 4.52
11/05/2007
Sami (Northern) (Finland)
se-FI
4,52 €
11.5.2007
Sami (Skolt) (Finland)
sms-FI
4,52 €
11.5.2007
Welsh (United Kingdom)
cy-GB
¡ê4.52
11/05/2007
Bosnian (Bosnia and Herzegovina)
bs-BA-Latn
4,52 KM
11.5.2007
Sami (Lule) (Norway)
smj-NO
kr 4,52
11.05.2007
Maori (New Zealand)
mi-NZ
$4.52
11/05/2007
Quechua (Ecuador)
quz-EC
$ 4,52
11/05/2007
Serbian (Latin) (Bosnia and Herzegovina)
sr-BA-Latn
4,52 KM
11.5.2007
Bengali (India)
bn-IN
?? 4.52
11-05-07
Sami (Lule) (Sweden)
smj-SE
4,52 kr
2007-05-11
Malayalam (India)
ml-IN
? 4.52
11-05-07
Northern Sotho (South Africa)
ns-ZA
R 4.52
2007/05/11
Quechua (Bolivia)
quz-BO
$b 4,52
11/05/2007
Sami (Northern) (Norway)
se-NO
kr 4,52
11.05.2007
Maltese (Malta)
mt-MT
Lm4.52
11/05/2007








18.1.CultureInfo
18.1.1.CultureInfo(de-DE)
18.1.2.Use all available culture type to format Date and currency
18.1.3.Creates a CompareInfo that uses the InvariantCulture.
18.1.4.Current week of the year is based on CultureInfo
18.1.5.Compare two substrings using different cultures and ignoring the case of the substrings
18.1.6.CultureInfo.CurrentCulture.DateTimeFormat.LongDatePattern
18.1.7.Specify a CultureInfo set to one of the cultures defined by that object
18.1.8.String representation of an object changes when it is formatted with three different IFormatProvider objects.
18.1.9.Changes the casing of a string based on the English (United States) culture, with the culture name en-US.