ONE Active Server Pages Product Home Page Developer Site Version


Developing International Applications

The default locale is selected during the installation of Sun ONE Active Server Pages. If you want to deliver ASP applications in different locales and languages, your administrator can change the locale specified for the ASP Server, as described in Configuring International Support. This ensures that the characters in the specified language display properly and that date, time, and currency formats are correct. Ask your administrator which locales are available.

Regardless of the locale for which your server is configured, you can dynamically change how certain content (such as date, time, and currency) is formatted so that it is appropriate for a given locale. You can do this from within an ASP page by changing the value of the Session.LCID property. The following example shows how to display the current date first in German and then in English, using the Session.LCID property:

Session.LCID = &H0407 ' specify Germany/German
Response.Write FormatDateTime( Date, vbLongDate ) & "<BR>" & vbNewLine
Session.LCID = &H0409 ' specify USA/English
Response.Write FormatDateTime( Date, vbLongDate ) & "<BR>" & vbNewLine

You can also change code pages by using the Session.CodePage property. For more information about the Session.LCID and Session.CodePage properties, see ASP Session Object Properties.

In this section:

Japanese Character Support

DB2 and Locale

Understanding Code Pages