I have a problem with my MVC Project where I need users to be able to change the localization of the site at runtime, my code below is what I've tried so far, and surely enough the current culture does change, but I'm seeing no changes in my site.
Strangely, setting the culture in Web.Config works fine!
my code is below, any ideas at all?
[AllowAnonymous]
[HttpPost]
public ActionResult SelectLanguage(LoginViewModel model)
{
switch (model.SelectedLanguage)
{
case "French":
CultureInfo.CurrentCulture=new CultureInfo("fr-fr");
CultureInfo.CurrentUICulture = new CultureInfo("fr-fr");
break;
}
return RedirectToAction("Index");
}