S
shapper
Hello,
I am initializing the culture of a page as follows:
protected override void InitializeCulture() {
base.InitializeCulture();
CultureInfo culture = Profile.Get().Visitor.Culture;
if (culture == null) culture = default(CultureInfo);
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
}
Basically, my objective is to get the culture from Visitor property in
profile. If it is null then use the default culture in Web.Config:
<globalization
culture="autot-PT"
uiCulture="autot-PT"/>
The problem is that when the culture is null in profile I always get
"en-US".
What am I doing wrong?
Thanks,
Miguel
I am initializing the culture of a page as follows:
protected override void InitializeCulture() {
base.InitializeCulture();
CultureInfo culture = Profile.Get().Visitor.Culture;
if (culture == null) culture = default(CultureInfo);
Thread.CurrentThread.CurrentCulture = culture;
Thread.CurrentThread.CurrentUICulture = culture;
}
Basically, my objective is to get the culture from Visitor property in
profile. If it is null then use the default culture in Web.Config:
<globalization
culture="autot-PT"
uiCulture="autot-PT"/>
The problem is that when the culture is null in profile I always get
"en-US".
What am I doing wrong?
Thanks,
Miguel