p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: Setting the Session.LCID

Message #1 by Imar Spaanjaars <Imar@c...> on Thu, 22 Jun 2000 14:32:49 +0200
As I understand it the following is the case:

You can set the LCID at the session level
If you set it also at the page level, it will override the session level
LCID setting

When using functions like FormatDateTime(), the LCID setting that is
currently in force should be the one that is used to format the Date and

You can't specify the format directly, but instead by supplying one of the
following parameters:
vbGeneralDate, vbLongDate, vbShortDate, vbShortTime, vbLongTime
you should get the default LongDate (etc) for the LCID that you specified.


----- Original Message -----
From: "Mark Everest" 
To: "How To" <proasp_howto@p...>
Sent: Friday, June 23, 2000 1:11 AM
Subject: [proasp_howto] RE: Setting the Session.LCID

> Ugh! Locales.........
> You think you've got problems........see the attached that no-one has
> answered since posting....(help please someone....)
> Anyway, I am unsure if how big the scope of Session.LCID is but i have had
> to resort to putting setlocale(session.LCID)  at the top of every page
> (this is not too much of an issue as I have a common logon page I include
> everywhere anyway......)
> This seems to resolve most of the foratting issues.  (Except that - The
> locale does not get implemented in any objects you create in your pages)
> <winge>
> Why has the topic of locales not been covered any any wrox book - or any
> book come to think of it...  I think no-one knows the actual answer so
> everyone avoids it.
> This is of great importance as the internet is "global" so needs to be
> multi-localeistic (is that a real word?) more that multi-lingual I feel -
> any views anyone????
> </winge>
> (Phew - got that off my chest)
> Let me know if you still have problems and I'll stand in the corner with a
> bucket on my head while I think of simething else that may help.....
> -----Original Message-----
> From: Imar Spaanjaars
> Sent: 22 June 2000 13:33
> To: How To
> Subject: [proasp_howto] Setting the Session.LCID
> Hi there,
> I have been looking for an answer to this problem at various places, but
> without luck so far.
> I have a problem with the Session.LCID property.
> When I set the LCID property at the Session level (in my global.asa) not
> all functions and pages seem to use it.
> For example, the Date() function uses the Session setting, but the
> FormatDateTime() does not. To have the FormatDateTime() function display
> the right date, I have to set the Session.LCID property at the page level
> as well.
> Is the LCID property a page level property? That is, do I have to set it
> every page to display dates etc correctly? Or am I using the property
> incorrectly?
> Does anybody know a solution for this situation? I'd rather not set the
> LCID in the opening ASP processing directive.
> I am using ASP 2 on IIS4
> Thanks in advance,
> Imar

  Return to Index