I been pulling my hair out all day.
i can't seem to set the current thread cultureui or culture to anything other than English. In the controller i have
protected override void Initialize(System.Web.Routing.RequestContext requestContext)
{
base.Initialize(requestContext);
CultureInfo cultureInfo = CultureInfo.GetCultureInfo("fr-FR");
Thread.CurrentThread.CurrentCulture = cultureInfo;
Thread.CurrentThread.CurrentUICulture = cultureInfo;
}
in my view i have
<%= Thread.CurrentThread.CurrentUICulture.EnglishName%>
the thread seems to be fine but as soon as the view renders some how its back to english!!
I know its a RC, so is it broken or am I missing something ??
cheers
Johnny
Set the language later. I use a filter that runs before the action (OnActionExecuting).
My first shot at it would be to set it in the action.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With