Josh_Blade
asked on
Globalization not workin in production
We currently have globlization set up and are able to switch between multiple languages on our development box. However when we push the code to production it stays defaulted to en-US. I have verified all entries in the web-config are the same and database entries for setting the session variables are the same.
When I output my session variable to the page is it correct for the change language. But the
CurrentUICulture stay en-US
Are there any server permissions or other factors that would affect this?
Any help is appreciated.
<httpModules>
<add name="CookieLocalizationMo dule" type="PDR.CookieLocalizati onModule, PDR" />
</httpModules>
<identity impersonate="true" />
<globalization uiCulture="auto" culture="auto" />
public void PreRequestHandlerExecute(o bject sender, EventArgs e)
{
string lang = null;
PDR.Models.Currency currency = null;
string currencyCulture = null;
try
{
lang = HttpContext.Current.Sessio n["Languag e"].ToStri ng();
currency = (PDR.Models.Currency)(Http Context.Cu rrent.Sess ion["Curre ncy"]);
currencyCulture = currency.CurrencyCulture;
var culture = new System.Globalization.Cultu reInfo(lan g);
var cculture = new System.Globalization.Cultu reInfo(cur rencyCultu re);
Thread.CurrentThread.Curre ntCulture = cculture;
Thread.CurrentThread.12= culture;
}
catch
{ }
}
When I output my session variable to the page is it correct for the change language. But the
CurrentUICulture stay en-US
Are there any server permissions or other factors that would affect this?
Any help is appreciated.
<httpModules>
<add name="CookieLocalizationMo
</httpModules>
<identity impersonate="true" />
<globalization uiCulture="auto" culture="auto" />
public void PreRequestHandlerExecute(o
{
string lang = null;
PDR.Models.Currency currency = null;
string currencyCulture = null;
try
{
lang = HttpContext.Current.Sessio
currency = (PDR.Models.Currency)(Http
currencyCulture = currency.CurrencyCulture;
var culture = new System.Globalization.Cultu
var cculture = new System.Globalization.Cultu
Thread.CurrentThread.Curre
Thread.CurrentThread.12= culture;
}
catch
{ }
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hope this helps someone else.
Two major Possiblities for this,
1) Check your resource DLL's are properly Created
2) The resource name and the language variable string should match
lang = HttpContext.Current.Sessio
This should be "en-US" ,"de-DE" etc
Regards
Deepu