ASP/VBScript SetLocale() Sets the global locale and returns the previous locale.
ShotDev Focus:
- Using Asp and SetLocale() function.
Locale Description |
Short |
Hex Value |
Value |
---|---|---|---|
Afrikaans | af | 0×0436 | 1078 |
Albanian | sq | 0×041C | 1052 |
Arabic - United Arab Emirates | ar-ae | 0×3801 | 14337 |
Arabic - Bahrain | ar-bh | 0×3C01 | 15361 |
Arabic - Algeria | ar-dz | 0×1401 | 5121 |
Arabic - Egypt | ar-eg | 0×0C01 | 3073 |
Arabic - Iraq | ar-iq | 0×0801 | 2049 |
Arabic - Jordan | ar-jo | 0×2C01 | 11265 |
Arabic - Kuwait | ar-kw | 0×3401 | 13313 |
Arabic - Lebanon | ar-lb | 0×3001 | 12289 |
Arabic - Libya | ar-ly | 0×1001 | 4097 |
Arabic - Morocco | ar-ma | 0×1801 | 6145 |
Arabic - Oman | ar-om | 0×2001 | 8193 |
Arabic - Qatar | ar-qa | 0×4001 | 16385 |
Arabic - Saudi Arabia | ar-sa | 0×0401 | 1025 |
Arabic - Syria | ar-sy | 0×2801 | 10241 |
Arabic - Tunisia | ar-tn | 0×1C01 | 7169 |
Arabic - Yemen | ar-ye | 0×2401 | 9217 |
Armenian | hy | 0×042B | 1067 |
Azeri - Latin | az-az | 0×042C | 1068 |
Azeri - Cyrillic | az-az | 0×082C | 2092 |
Basque | eu | 0×042D | 1069 |
Belarusian | be | 0×0423 | 1059 |
Bulgarian | bg | 0×0402 | 1026 |
Catalan | ca | 0×0403 | 1027 |
Chinese - China | zh-cn | 0×0804 | 2052 |
Chinese - Hong Kong SAR | zh-hk | 0×0C04 | 3076 |
Chinese - Macau SAR | zh-mo | 0×1404 | 5124 |
Chinese - Singapore | zh-sg | 0×1004 | 4100 |
Chinese - Taiwan | zh-tw | 0×0404 | 1028 |
Croatian | hr | 0×041A | 1050 |
Czech | cs | 0×0405 | 1029 |
Danish | da | 0×0406 | 1030 |
Dutch - Netherlands | nl-nl | 0×0413 | 1043 |
Dutch - Belgium | nl-be | 0×0813 | 2067 |
English - Australia | en-au | 0×0C09 | 3081 |
English - Belize | en-bz | 0×2809 | 10249 |
English - Canada | en-ca | 0×1009 | 4105 |
English - Caribbean | en-cb | 0×2409 | 9225 |
English - Ireland | en-ie | 0×1809 | 6153 |
English - Jamaica | en-jm | 0×2009 | 8201 |
English - New Zealand | en-nz | 0×1409 | 5129 |
English - Phillippines | en-ph | 0×3409 | 13321 |
English - South Africa | en-za | 0×1C09 | 7177 |
English - Trinidad | en-tt | 0×2C09 | 11273 |
English - United Kingdom | en-gb | 0×0809 | 2057 |
English - United States | en-us | 0×0409 | 1033 |
Estonian | et | 0×0425 | 1061 |
Farsi | fa | 0×0429 | 1065 |
Finnish | fi | 0×040B | 1035 |
Faroese | fo | 0×0438 | 1080 |
French - France | fr-fr | 0×040C | 1036 |
French - Belgium | fr-be | 0×080C | 2060 |
French - Canada | fr-ca | 0×0C0C | 3084 |
French - Luxembourg | fr-lu | 0×140C | 5132 |
French - Switzerland | fr-ch | 0×100C | 4108 |
Gaelic - Ireland | gd-ie | 0×083C | 2108 |
Gaelic - Scotland | gd | 0×043C | 1084 |
German - Germany | de-de | 0×0407 | 1031 |
German - Austria | de-at | 0×0C07 | 3079 |
German - Liechtenstein | de-li | 0×1407 | 5127 |
German - Luxembourg | de-lu | 0×1007 | 4103 |
German - Switzerland | de-ch | 0×0807 | 2055 |
Greek | el | 0×0408 | 1032 |
Hebrew | he | 0×040D | 1037 |
Hindi | hi | 0×0439 | 1081 |
Hungarian | hu | 0×040E | 1038 |
Icelandic | is | 0×040F | 1039 |
Indonesian | id | 0×0421 | 1057 |
Italian - Italy | it-it | 0×0410 | 1040 |
Italian - Switzerland | it-ch | 0×0810 | 2064 |
Japanese | ja | 0×0411 | 1041 |
Korean | ko | 0×0412 | 1042 |
Latvian | lv | 0×0426 | 1062 |
Lithuanian | lt | 0×0427 | 1063 |
Macedonian (FYROM) | mk | 0×042F | 1071 |
Malay - Malaysia | ms-my | 0×043E | 1086 |
Malay ? Brunei | ms-bn | 0×083E | 2110 |
Maltese | mt | 0×043A | 1082 |
Marathi | mr | 0×044E | 1102 |
Norwegian - Bokml | no-no | 0×0414 | 1044 |
Norwegian - Nynorsk | no-no | 0×0814 | 2068 |
Polish | pl | 0×0415 | 1045 |
Portuguese - Portugal | pt-pt | 0×0816 | 2070 |
Portuguese - Brazil | pt-br | 0×0416 | 1046 |
Raeto-Romance | rm | 0×0417 | 1047 |
Romanian - Romania | ro | 0×0418 | 1048 |
Romanian - Republic of Moldova | ro-mo | 0×0818 | 2072 |
Russian | ru | 0×0419 | 1049 |
Russian - Republic of Moldova | ru-mo | 0×0819 | 2073 |
Sanskrit | sa | 0×044F | 1103 |
Serbian - Cyrillic | sr-sp | 0×0C1A | 3098 |
Serbian - Latin | sr-sp | 0×081A | 2074 |
Setsuana | tn | 0×0432 | 1074 |
Slovenian | sl | 0×0424 | 1060 |
Slovak | sk | 0×041B | 1051 |
Sorbian | sb | 0×042E | 1070 |
Spanish - Spain | es-es | 0×0C0A | 1034 |
Spanish - Argentina | es-ar | 0×2C0A | 11274 |
Spanish - Bolivia | es-bo | 0×400A | 16394 |
Spanish - Chile | es-cl | 0×340A | 13322 |
Spanish - Colombia | es-co | 0×240A | 9226 |
Spanish - Costa Rica | es-cr | 0×140A | 5130 |
Spanish - Dominican Republic | es-do | 0×1C0A | 7178 |
Spanish - Ecuador | es-ec | 0×300A | 12298 |
Spanish - Guatemala | es-gt | 0×100A | 4106 |
Spanish - Honduras | es-hn | 0×480A | 18442 |
Spanish - Mexico | es-mx | 0×080A | 2058 |
Spanish - Nicaragua | es-ni | 0×4C0A | 19466 |
Spanish - Panama | es-pa | 0×180A | 6154 |
Spanish - Peru | es-pe | 0×280A | 10250 |
Spanish - Puerto Rico | es-pr | 0×500A | 20490 |
Spanish - Paraguay | es-py | 0×3C0A | 15370 |
Spanish - El Salvador | es-sv | 0×440A | 17418 |
Spanish - Uruguay | es-uy | 0×380A | 14346 |
Spanish - Venezuela | es-ve | 0×200A | 8202 |
Southern Sotho | st | 0×0430 | 1072 |
Swahili | sw | 0×0441 | 1089 |
Swedish - Sweden | sv-se | 0×041D | 1053 |
Swedish - Finland | sv-fi | 0×081D | 2077 |
Tamil | ta | 0×0449 | 1097 |
Tatar | tt | 0X0444 | 1092 |
Thai | th | 0×041E | 1054 |
Turkish | tr | 0×041F | 1055 |
Tsonga | ts | 0×0431 | 1073 |
Ukrainian | uk | 0×0422 | 1058 |
Urdu | ur | 0×0420 | 1056 |
Uzbek - Cyrillic | uz-uz | 0×0843 | 2115 |
Uzbek ? Latin | uz-uz | 0×0443 | 1091 |
Vietnamese | vi | 0×042A | 1066 |
Xhosa | xh | 0×0434 | 1076 |
Yiddish | yi | 0×043D | 1085 |
Zulu | zu | 0×0435 | 1077 |
Example
asp_setlocale.asp
<% Option Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% SetLocale(1054) '*** Thai ***' Response.write CDate("12/12/2010")&"<br>" Response.write CDate("1 Mar 2010")&"<br>" Response.write CDate("Apr 5 2010")&"<br>" Response.write CDate("31/08/2010")&"<br>" Response.write("<hr>") SetLocale(1033) '*** US ***' Response.write CDate("12/12/2010")&"<br>" Response.write CDate("1 Mar 2010")&"<br>" Response.write CDate("Apr 5 2010")&"<br>" Response.write CDate("31/08/2010")&"<br>" %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_setlocale.asp
Screenshot