Link:http://output.to/sideway/default.asp?qno=120200011 LCID Response ObjectAnother important function of Response object is the control of ASP engine for the HTML output. Response.LCID PropertyResponse.LCID property set the value of LCID for the data of response output to specify the format of dates, times, and currency for different geographical locale for the server. Syntax:Response.LCID [=LocaleID] Or in an ASP file. Imply <% Response.LCID [=LocaleID] %> Parameters: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.
Remarks:The Response.LCID property is used to specify the locale format of dates, times and currencies of a page. 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 Response.CodePage, 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. Examples:
|
Sideway BICK Blog 06/02 |