Last post May 15, 2005 12:00 PM by jakeburkey
May 14, 2005 05:14 AM|rians|LINK
Hi guys...a bit new to this whole thing
I've been searching, but can't find anywhere how to change the overall currency of the app. It's probably right in front of me but can't, for the life of me find the damn setting.
Any help would be greatly appreciated.
Thanks in advance...
May 15, 2005 12:00 PM|jakeburkey|LINK
There are (at least) two ways to do it - one is simpler, but the other is more flexible.
The first approach involves adding something like the following code to the aspx page of interest (e.g. ProductList.aspx):
<%@ Page Culture="de-DE" UICulture="de-DE" Language="VB" %><%@ Import Namespace="System.Globalization" %><%@ Import Namespace="System.Threading" %>
This code sets the page culture to German. Note that this is VB, so it will be a little different for the other languages. More importantly, if you are using the code-behind model, only the first line will appear in the aspx page - the namespace references
will go in the code-behind page.
The second approach involves instantiating a CultureInfo object for the page (and there are examples in the .NET SDK of how this can be used to deliver a page that is targeted to the culture of the client by reading the culture setting of the client browser
and using it to set the culture of the page). The following link shows a very simple example of using the CultureInfo approach:
P.S. I tried a third approach, that should be available in .NET version 2.0, but I couldn't get it to work. It involves opening the Virtual Directory Properties dialog for the app in the IIS admin console and then selecting the default culture in the dialog
that opens from the Edit Configuration button on the ASP.NET tab. It may be that the app needs to be recompiled using the v2.0 compiler for this option to work - I don't know.