please dont rip this site
Platform SDK: IIS SDK
      [IIS 5.0] [IIS 5.1] [IIS 6.0]

Session.LCID

The LCID property specifies how dates, times, and currencies are formatted. Locale identifiers (LCID)s are not the same for each geographical locale. Some locales format dates as YY-MM-DD, and some format dates as MM-DD-YYYY. The LCID property is read/write.

note Note  The locale group has to be installed on the Web server before its locale identifier can be specified in a Web page or application. Use the Regional and Language Options control panel application to install locale groups.

Syntax

Session.LCID(=index.html LocaleID)

Parameters

LocaleID
An integer that represents the geographical locale. You can find locale integers on MSDN Library.

Remarks

Setting Session.LCID explicitly affects all responses in a session.

If Session.LCID is not explicitly set in a page, it is implicitly set by the AspLCID metabase property. If the AspLCID metabase property is not set, or set to 0, Session.LCID is set by the default system locale.

Session.LCID can be set multiple times in one Web page and used to format data each time. Some locales need the matching codepage to be set to display characters properly. For example, to display dates and times in several locales on one page, the codepage must be set to UTF-8 (65001) to show all the characters.

If you set Response.LCID or Session.LCID explicitly, do so before displaying formatted output. Setting Session.LCID changes the locale for both the ASP application and the scripting engine. Using the VBScript function setLocale only changes the locale for the scripting engine.

If the locale of your Web page matches the system defaults of the Web client, you do not need to set a locale in your Web page. However, setting the value is recommended.

If the locale is set in a page, and the codepage is set to display the characters properly, Response.Charset should also be set. The codepage value specifies to IIS how to encode the data when building the response, and the charset value specifies to the browser how to decode the data when displaying the response. The CharsetName of Response.Charset must match the codepage value, or mixed characters are displayed in the browser. Lists of CharsetNames and matching codepage values can be found on MSDN Web Workshop under the columns for Preferred Charset Label and FamilyCodePage.

If you are writing and testing Web pages that use different locales, codepages, and character sets (for example, if you are creating a multilingual Web site), remember that your test client computer must have the language packs installed for each language you want to display. You can install language packs from Regional and Language Options in the Control Panel.

Example

The following example demonstrates setting the locale to British English and using the VBScript FormatCurrency method to display the value 125 as currency with the £ symbol:

<%

  Session.LCID =index.html 2057

  Dim curNumb

  curNumb = FormatCurrency(125)

  Response.Write (curNumb)

>

Applies To

Session Object

See Also

Requirements

Platforms: Windows 2000 with IIS 5.0 installed, Windows XP with IIS 5.1 installed, Windows Server 2003 family with IIS 6.0 installed

Platform SDK Release: February 2003
What did you think of this topic?
Order a Platform SDK CD


file: /Techref/language/asp/OBJ/ref_vbom_sesoplcid.htm, 5KB, , updated: 2003/5/15 13:13, local time: 2024/11/30 01:25,
TOP NEW HELP FIND: 
13.59.111.183:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://massmind.ecomorder.com/techref/language/asp/OBJ/ref_vbom_sesoplcid.htm"> Session.LCID</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to ecomorder.com!

 

Welcome to massmind.ecomorder.com!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .