Properly Formatting International Websites

 If you have developed international web sites, you had to format dates, numbers, currency, etc. yourself and relying on the version of Windows that was installed on the server was no good idea in case you moved sites from say The United States to a United Kingdom provider. With IIS4 and IIS5 (Windows NT4 and Windows 2000 respectively) you only need to set the LOCALE ID (Session.LCID) and everything is done for you. The Session.LCID is a read/write property, meaning you can assign a value to it as well as read its current value.

Session.LCID has session scope, which means you can just add one line of code to your global.asa file and ASP does the rest for you. Just remember that if you assign a new value to the Session.LCID it will override global.asa and will remain until a new value is set or the session is ended.
Below you can see locale id's for the US and the UK as well as how dates are formatted using these locales.


Session.LCID = 1033 'This is the English(United States) format.

  Short Date : 10/23/2003
  Long Date : Thursday, October 23, 2003
  Time : 2:40:25 PM
  Currency : $9.95
  
Session.LCID = 2057 'This is the English(British) format

  Short Date : 23/10/2003
  Long Date : 23 October 2003
  Time : 14:40:25
  Currency : £10.00


When working with databases, you will want to also set the format of the date field to correspond with the LCID that is being used in the script. You can do this by going into the design view and setting the format to dd/mm/yyyy or the format you are using.

Below is a table of the LCIDs, and the corresponding language that you have available:

LCID Language LCID Language
1078 Afrikaans 1052 Albanian
5121 Arabic(Algeria) 15361 Arabic(Bahrain)
3073 Arabic(Egypt) 2049 Arabic(Iraq)
11265 Arabic(Jordan) 13313 Arabic(Kuwait)
12289 Arabic(Lebanon) 4097 Arabic(Libya)
6145 Arabic(Morocco) 8193 Arabic(Oman)
16385 Arabic(Qatar) 1025 Arabic(Saudi Arabia)
10241 Arabic(Syria) 7169 Arabic(Tunisia)
14337 Arabic(U.A.E.) 9217 Arabic(Yemen)
1069 Basque 1059 Belarusian
1026 Bulgarian 1027 Catalan
3076 Chinese(Hong Kong) 2052 Chinese(PRC)
4100 Chinese(Singapore) 1028 Chinese(Taiwan)
1050 Croatian 1029 Czech
1030 Danish 2067 Dutch(Belgian)
1043 Dutch(Standard) 9 English
3081 English(Australian) 10249 English(Belize)
2057 English(British) 4105 English(Canadian)
9225 English(Caribbean) 6153 English(Ireland)
8201 English(Jamaica) 5129 English(New Zealand)
7177 English(South Africa) 11273 English(Trinidad)
1033 English(United States) 1061 Estonian
1080 Faeroese 1065 Farsi
1035 Finnish 2060 French(Belgian)
3084 French(Canadian) 5132 French(Luxembourg)
1036 French(Standard) 4108 French(Swiss)
2108 Gaelic(Irish) 1084 Gaelic(Scots)
3079 German(Austrian) 5127 German(Liechtenstein)
4103 German(Luxembourg) 1031 German(Standard)
2055 German(Swiss) 1032 Greek
1037 Hebrew 1081 Hindi
1038 Hungarian 1039 Icelandic
1057 Indonesian 1040 Italian(Standard)
2064 Italian(Swiss) 1041 Japanese
1042 Korean 2066 Korean(Johab)
1062 Latvian 1063 Lithuanian
1071 Macedonian 1086 Malaysian
1082 Maltese 1044 Norwegian(Bokmal)
2068 Norwegian(Nynorsk) 1045 Polish
1046 Portuguese(Brazilian) 2070 Portuguese(Standard)
1047 Rhaeto-Romanic 1048 Romanian
2072 Romanian(Moldavia) 1049 Russian
2073 Russian(Moldavia) 1083 Sami(Lappish)
3098 Serbian(Cyrillic) 2074 Serbian(Latin)
1051 Slovak 1060 Slovenian
1070 Sorbian 11274 Spanish(Argentina)
16394 Spanish(Bolivia) 13322 Spanish(Chile)
9226 Spanish(Colombia) 5130 Spanish(Costa Rica)
7178 Spanish(Dominican Republic) 12298 Spanish(Ecuador)
17418 Spanish(El Salvador) 4106 Spanish(Guatemala)
18442 Spanish(Honduras) 2058 Spanish(Mexican)
19466 Spanish(Nicaragua) 6154 Spanish(Panama)
15370 Spanish(Paraguay) 10250 Spanish(Peru)
20490 Spanish(Puerto Rico) 3082 Spanish,Spain-Modern Sort
1034 Spanish(Spain - Traditional Sort) 14346 Spanish(Uruguay)
8202 Spanish(Venezuela) 1072 Sutu
1053 Swedish 2077 Swedish(Finland)
1054 Thai 1073 Tsonga
1074 Tswana 1055 Turkish
1058 Ukrainian 1056 Urdu
1075 Venda 1066 Vietnamese
1076 Xhosa 1085 Yiddish
1077 Zulu 2048 default

Back to top