Extend AbleCommercePage for Language Globalization?

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
keats76
Commander (CMDR)
Commander (CMDR)
Posts: 117
Joined: Sat Dec 15, 2007 4:45 pm

Extend AbleCommercePage for Language Globalization?

Post by keats76 » Wed Jul 23, 2008 3:41 pm

I'm in the process of translating my website into a number of different languages (using Local and Global resource bundles). I'm going to implement a new profile field to allow the user to select the language of choice. I will also make use of the "Auto" culture features of .NET 2.0.

In order to make the manual Culture settings stick, I think I'll have to implement/override the InitializeCulture method in the Page Base class. Since everything in Able seems to build off of the AbleCommercePage, I suppose I'll have to extend that with my new InitializeCulture method.

For those in the know, does this sound like a valid plan of attack? Does Able currently use the InitializeCulture method to do anything? I don't have the source so I can't see.

Thanks,
Mike

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Extend AbleCommercePage for Language Globalization?

Post by mazhar » Thu Jul 24, 2008 10:03 am

In the AbleCommercePage class InitializeCulture() method we are just setting the current thread culture to United States culture and Negative currency Pattern to -$n.
Here is the InitializeCulture() code from AbleCommercePage class

Code: Select all

protected override void InitializeCulture()
        {
            base.InitializeCulture();
            CultureInfo culture = new CultureInfo("en-US");
            culture.NumberFormat.CurrencyNegativePattern = 1;
            Thread.CurrentThread.CurrentCulture = culture;
        }

keats76
Commander (CMDR)
Commander (CMDR)
Posts: 117
Joined: Sat Dec 15, 2007 4:45 pm

Re: Extend AbleCommercePage for Language Globalization?

Post by keats76 » Fri Jul 25, 2008 8:39 am

Thanks for the info!

nogatek
Ensign (ENS)
Ensign (ENS)
Posts: 18
Joined: Thu Aug 28, 2008 7:57 pm

Re: Extend AbleCommercePage for Language Globalization?

Post by nogatek » Wed Mar 04, 2009 6:02 pm

How do I set globalization and localization for AC 7.0.2?

I've tried modifying the web.config but it has no effect:

<globalization fileEncoding="utf-8" requestEncoding="utf-8" responseEncoding="utf-8" culture="en-AU" uiCulture="en-AU"/>

Surely this must be easy! Just can't find it...

Please help,

Mark

Post Reply