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?
public void PreRequestHandlerExecute(object sender, EventArgs e)
{
string lang = null;
PDR.Models.Currency currency = null;
string currencyCulture = null;
try
{
lang = HttpContext.Current.Session["Language"].ToString();
currency = (PDR.Models.Currency)(HttpContext.Current.Session["Currency"]);
currencyCulture = currency.CurrencyCulture;
var culture = new System.Globalization.CultureInfo(lang);
var cculture = new System.Globalization.CultureInfo(currencyCulture);
Thread.CurrentThread.CurrentCulture = cculture;
Thread.CurrentThread.12= culture;
}
catch
{ }
}
.NET ProgrammingC#ASP.NET
Last Comment
Josh_Blade
8/22/2022 - Mon
deepu chandran
HI,
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.Session["Language"].ToString();
This should be "en-US" ,"de-DE" etc
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