Sideway from Sideway

Draft for Information Only


Session Object
 Session.LCID Property

Session Object

Another important function of Response object is the control of ASP engine for the HTML output.

Session.LCID Property

Session.LCID property sets the value of LCID for the data of response in the intrinsic objects to specify the format of dates, times, and currency for different geographical locale for an entire session..


Session.LCID [=LocaleID]

 Or in an ASP file. Imply

<% Session.LCID [=LocaleID] %>



The parameter "LocaleID" is the locale Identifer to represent the locale formatting used for the HTML output. The data type of "LocaleID" is integer. The possible LocaleID are.

LCID Country / Region Language
1078 South Africa Afrikaans
1052 Albania Albanian
5121 Algeria Arabic
15361 Bahrain Arabic
3073 Egypt Arabic
2049 Iraq Arabic
11265 Jordan Arabic
13313 Kuwait Arabic
12289 Lebanon Arabic
4097 Libya Arabic
6145 Morocco Arabic
8193 Oman Arabic
16385 Qatar Arabic
1025 Saudi Arabia Arabic
10241 Syria Arabic
7169 Tunisia Arabic
14337 U.A.E. Arabic
9217 Yemen Arabic
1067 Armenia Armenian
2092 Azerbaijan Azeri (Cyrillic)
1068 Azerbaijan Azeri (Latin)
1069 Spain Basque
1059 Belarus Belarusian
1026 Bulgaria Bulgarian
1027 Spain Catalan
3076 Hong Kong S.A.R. Chinese
5124 Macau S.A.R. Chinese
2052 People's Republic of China Chinese (Default Chinese-Simplified Locale ID)
4100 Singapore Chinese
1028 Taiwan Chinese
1050 Croatia Croatian
1029 Czech Republic Czech
1030 Denmark Danish
1125 Maldives Divehi
2067 Belgium Dutch
1043 Netherlands Dutch
3081 Australia English
10249 Belize English
4105 Canada English
9225 Caribbean English
6153 Ireland English
8201 Jamaica English
5129 New Zealand English
13321 Republic of the Philippines English
7177 South Africa English
11273 Trinidad and Tobago English
2057 United Kingdom English
1033 United States English (Default English Locale ID)
12297 Zimbabwe English
1061 Estonia Estonian
1080 Faeroe Islands Faroese
1065 Iran Farsi
1035 Finland Finnish
2060 Belgium French
3084 Canada French
1036 France French (Default French Locale ID)
5132 Luxembourg French
6156 Principality of Monaco French
4108 Switzerland French
1071 Former Yugoslav Republic of Macedonia FYRO Macedonian
1110 Spain Galician
1079 Georgia Georgian
3079 Austria German
1031 Germany German (Default German Locale ID)
5127 Liechtenstein German
4103 Luxembourg German
2055 Switzerland German
1032 Greece Greek
1095 India Gujarati
1037 Israel Hebrew
1081 India Hindi
1038 Hungary Hungarian
1039 Iceland Icelandic
1057 Indonesia Indonesian
1040 Italy Italian (Default Italian Locale ID)
2064 Switzerland Italian
1041 Japan Japanese
1099 India Kannada
1087 Kazakhstan Kazakh
1111 India Konkani
1042 Korea Korean
1088 Kyrgyzstan Kyrgyz
1062 Latvia Latvian
1063 Lithuania Lithuanian
2110 Brunei Darussalam Malay
1086 Malaysia Malay
1102 India Marathi
1104 Mongolia Mongolian
1044 Norway Norwegian (Bokmål)
2068 Norway Norwegian (Nynorsk)
1045 Poland Polish
1046 Brazil Portuguese
2070 Portugal Portuguese
1094 India Punjabi
1048 Romania Romanian
1049 Russia Russian
1103 India Sanskrit
3098 Serbia and Montenegro Serbian (Cyrillic)
2074 Serbia and Montenegro Serbian (Latin)
1051 Slovakia Slovak
1060 Slovenia Slovenian
11274 Argentina Spanish
16394 Bolivia Spanish
13322 Chile Spanish
9226 Colombia Spanish
5130 Costa Rica Spanish
7178 Dominican Republic Spanish
12298 Ecuador Spanish
17418 EI Salvador Spanish
4106 Guatemala Spanish
18442 Honduras Spanish
2058 Mexico Spanish
19466 Nicaragua Spanish
6154 Panama Spanish
15370 Paraguay Spanish
10250 Peru Spanish
1034 Spain Spanish
14346 Uruguay Spanish
8202 Venezuela Spanish
3082 Spain Spanish - Modern Sort (Default Spanish Locale ID)
1089 Kenya Swahili
2077 Finland Swedish
1053 Sweden Swedish
1114 Syria Syriac
1097 India Tamil
1092 Tatarstan Tatar
1098 India Telugu
1054 Thailand Thai
1055 Turkey Turkish
1058 Ukraine Ukrainian
1056 Islamic Republic of Pakistan Urdu
2115 Uzbekistan Uzbek (Cyrillic)
1091 Uzbekistan Uzbek (Latin)
1066 Viet Nam Vietnamese
1106 United Kingdom Welsh


The Session.LCID property is used to set the locale format of dates, times and currencies for all responses in a session explicitly. The locale format is only to specify the display format, not the encoded code.

Since a locale ID is used to represent  a predefined locale format, in order to use the specified locale ID in a page or application, the corresponding locale group should be installed through the adding of locale groups in the Regional and Language Options in the Control Panel.

And a locale format is always needed for for formating the locale format of dates, times and currencies of every response body output. If Response.LCID is not explicitly set in a page, the value of LCID for the page should be determined from other settings.

If sessions are enabled, the Response.LCID can then be implicitly set by the Session.LCID.

If sessions are not enabled and the @LCID is present in the ASP file, the Response.LCID can then be set by the  @LCID.

If the @LCID is not present in the ASP file, the Response.LCID can then be set by the ASPLCID metabase property.

If the ASPLCID metabase property is also not set or is set to 0, the Response.LCID is then set by the system locale.

Unlike Session.CodePage, Session.LCID, like Response.LCID, can be used to set the locale format multiple times with different format in a page. However, some locales with characters should be matched with the code page in order to display all characters correctly in a page.

Besides setting the Response.LCID not only change the locale of the ASP application, the Response.LCID also change the locale of the scipting engine. But when using the VBScript function setLocale(), the setLocale() function can change the locale for the scripting engine only.

Since the system default locale will be used when there is no locale setting in a web page, sometimes it is not necessary to set a locale in the web page for those web client with matched system default locale. However, setting the locale for a web page is alway necessary for formating the response output correctly for all web client in the WWW.

So in order to display the specified format correctly, the explicit setting of Response.LCID or Session.LCID should be set before sending the formatted locale output to the client.

And therefore if locale is set in the page,  the code page is also set in a page, the Response.Charset should also be set in order to ensure the response output is displayed correctly for all web client in the WWW. So that the server can encode the page according to the specified code page with the specified locale format before sending the response output to the client and the client can therefore decode the page according to the specified charset correctly.

Similarly, in order to test web pages that use different locales, code pages and character sets in a client computer, the corresponding language packs should also be installed through the adding of language packs in the Regional and Language Options in the Control Panel.


  • Response.CodePage with value "65001" with @CodePage=65001 and Response.CharSet with value "utf-8",  and the ASP file is saved in utf-8 format. And Response.LCID with value "1033",  "2052"

    ASP script command:

    <%@CodePage=65001 %>
    <% Response.CodePage=65001 %>
    <% Response.CharSet="utf-8" %>
    <% Session.LCID=1033 %>
    <%="Response.LCID: "&Response.LCID&"<br />"%>
    <%=FormatDateTime(Date,1)&"<br />"%>
    <%=FormatDateTime(Time,3)&"<br />"%>
    <%=FormatCurrency(1000)&"<br />"%>
    <%=FormatNumber(50, 3, 0, 0, -1)&"<br />"%>
    <br />
    <% Session.LCID=2052 %>
    <%="Response.LCID: "&Response.LCID&"<br />"%>
    <%=FormatDateTime(Date,1)&"<br />"%>
    <%=FormatDateTime(Time,3)&"<br />"%>
    <%=FormatCurrency(1000)&"<br />"%>
    <%=FormatNumber(50, 3, 0, 0, -1)&"<br />"%>

    HTTP response output:

    Response.LCID: 1033<br />
    Friday, August 16, 2019<br />
    5:51:01 AM<br />
    $1,000.00<br />
    50.000<br />
    <br />
    Response.LCID: 2052<br />
    2019年8月16日<br />
    5:51:01<br />
    ¥1,000.00<br />
    50.000<br />

    HTML web page ouput:

    Response.LCID: 1033
    Friday, August 16, 2019
    5:51:01 AM

    Response.LCID: 2052



  1. Active Server Pages,, updated 20Dec2012
  2. ASP Overview,, updated 21Dec2012
  3. ASP Best Practices,, updated 15Apr2013
  4. ASP Built-in Objects,, updated 20Dec2012
  5. Response Object,, updated 20Dec2012
  6. Request Object,, updated 20Dec2012
  7. Server Object (IIS),, updated 20Dec2012
  8. Application Object (IIS),, updated 20Dec2012
  9. Session Object (IIS),, updated 20Dec2012
  10. ASPError Object,, updated 20Dec2012
  11. ObjectContext Object (IIS),, updated 20Dec2012
  12. Debugging Global.asa Files,, updated 15Apr2013
  13. How to: Debug Global.asa files,, updated 15Apr2013
  14. Calling COM Components from ASP Pages,, updated 15Apr2013
  15. IIS ASP Scripting Reference,, updated 15Apr2013
  16. ASP Keywords,, updated 15Apr2013
  17. Creating Simple ASP Pages,, updated 15Apr2013
  18. Including Files in ASP Applications,, updated 15Apr2013
  19. ASP Overview,, updated 15Apr2013
  20. FileSystemObject Object,, updated 14Mayr2013
  21., ADO Object Model, updated 15Apr2013
  22. ADO Fundamentals,, updated 14Mayr2013

ID: 120200045 Last Updated: 2/12/2012 Revision: 0 Ref:


Home (5)



HBR (3)



Hobbies (7)


Chinese (1097)

English (336)

Reference (66)


Hardware (149)


Application (187)

Digitization (24)

Numeric (19)


Web (644)new



Regular Expression (SC)


Knowledge Base

Common Color (SC)

Html Entity (Unicode) (SC)

Html 401 Special (SC)

OS (389)new

MS Windows

Windows10 (SC)

.NET Framework (SC)

DeskTop (7)



Formulas (8)

Number Theory (206)

Algebra (20)

Trigonometry (18)

Geometry (18)

Calculus (67)

Complex Analysis (21)


Tables (8)


Mechanics (1)

Rigid Bodies

Statics (92)

Dynamics (37)

Fluid (5)

Fluid Kinematics (5)


Process Control (1)

Acoustics (19)

FiniteElement (2)

Biology (1)

Geography (1)

Latest Updated Links

Copyright © 2000-2019 Sideway . All rights reserved Disclaimers last modified on 10 Feb 2019