Page 1 of 1

Extend AbleCommercePage for Language Globalization?

Posted: Wed Jul 23, 2008 3:41 pm
by keats76
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

Re: Extend AbleCommercePage for Language Globalization?

Posted: Thu Jul 24, 2008 10:03 am
by mazhar
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;
        }

Re: Extend AbleCommercePage for Language Globalization?

Posted: Fri Jul 25, 2008 8:39 am
by keats76
Thanks for the info!

Re: Extend AbleCommercePage for Language Globalization?

Posted: Wed Mar 04, 2009 6:02 pm
by nogatek
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