an ASP.NET Open Source CMS & eCommerce platform
Search:
Last Post 5/22/2012 9:44:53 AM By lukezy. 12 replies.
Page 1 of 2 (13 posts) << First < Prev 1 2 Next > Last >> 
11/27/2007 5:28:01 AM
LlewellynK
Posts: 16
Joined: 4/23/2008
Site Localisation

<font size="2" face="Verdana">Hello again,

While testing DSC I needed to change my default currency from USD to ZAR. By default DSC's site asp.net-<font size="2" face="Verdana">culture <font size="2" face="Verdana">is set to en-US . I've changed this to en-ZA and this caused the currency sumbol change.
Now, I've run into a problem with my Product Date Created input. It no longer accepts my date format and report that it is invalid when I try to update an existing or add a new product.I have tried all three international formats without success, any information I enter is automatically formatted by an input validator of sorts.
This problem does go away if I change my culture information back to en-US.

Is there something that I am missing that also needs to be changed to get the date validation working with my chosen culture?

Thanks,

   LK




11/27/2007 12:17:26 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Site Localisation

The V1 of DSC wasn't designed to support non-US languages. We know there might be issues if you use non-US language. So you are on your own if you want to get V1  work with other lanuages. We are planning on V2 right now. International language support might be one of the features in V2. We will get the roadmap updated when V2 planning is done.

DotShoppingCart Staff
11/28/2007 8:42:24 AM
LlewellynK
Posts: 16
Joined: 4/23/2008
Re: Site Localisation

Thanks for the feedback Luke.
My aim is to simply change the default currency symbol from $ USD to another. I have been under the impression that to change your currency symbol you had to change your configured language.
Will you please clarify this for me? Is it possible to change your currency symbol without changing your asp.net locale property?

11/28/2007 12:09:57 PM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Site Localisation

Here are tips to change currency symbol manually without changing the default culture. Find all the places that are doing string.Format("C") and change those to string.Format(<font color="#2b91af" size="2">CultureInfo.CreateSpecificCulture(<font color="#a31515" size="2">"<font face="Verdana" color="#000000">en-ZA"), "C"). There are places in aspx or ascx files where $ sign is hardcoded. Change those to the currency symbol that you want.

Although these steps are not best practice they are probably the easiest work around to make DSC v1 working with other culture.

DotShoppingCart Staff
11/29/2007 6:50:33 AM
LlewellynK
Posts: 16
Joined: 4/23/2008
Re: Site Localisation

Thanks for the solution Luke.

I am looking into another method that shows promise. The current culture is accessible for each thread and the currency symbol can be overriden. The idea is to perform an override on a session start in the global.asa. Optionally, the user could configure a <appSetting><currenctSymbol value="$" /></appSetting> to specify the overriden currency symbol.

I will test this over the weekend and follow up on this post.

11/29/2007 9:27:47 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Site Localisation

Great job. Please keep us updated.

DotShoppingCart Staff
12/1/2007 8:58:50 AM
LlewellynK
Posts: 16
Joined: 4/23/2008
Re: Site Localisation

Okay, to change the currency symbol can be done by adding the following code to the the global.asa file's Begin Request event.
This change does not appear to effect site performance as stress testing before and after yield the same page hit results.


    protected void Application_BeginRequest(Object sender, EventArgs e)
    {
      // overwrite currency symbol with R
      System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
      System.Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.CurrencySymbol = "R";   
    }
  

Initially I tried executing this code on the Session Start event however this failed to maintain the new currency symbol across multiple requests.

4/19/2009 11:14:54 PM
Redcorp
Posts: 11
Joined: 1/13/2009
Re: Site Localisation
Does this work on Ver 3.1? .. I need to display Euro Sign instead of Dollar . Please Help
4/20/2009 9:19:50 AM
lukezy
Posts: 2109
Joined: 6/12/2007
Location:WA, US
Re: Site Localisation
In V3.1 there is a better way. You just need to create a culture and then change the culture in the store admin.
DotShoppingCart Staff
5/22/2012 2:49:15 AM
verse
Posts: 3
Joined: 5/21/2012
Re: Site Localisation
please give me the steps to do all this u have mentioned because i;m stuck i dont know where to start. i want to change the $ sing to rands R... thank you
5/22/2012 2:50:28 AM
verse
Posts: 3
Joined: 5/21/2012
Re: Site Localisation
i meant sign!
Page 1 of 2 (13 posts) << First < Prev 1 2 Next > Last >>