New Project-- First add the "resource file". Change the resource file access modifier to public. Go to Solution Explorer and right click on Models=>Add=>Class.(Registration) public class Registration { [Display(Name = "FirstName", ResourceType = typeof(Resource))] [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "FirstNameRequired")] public string FirstName { get; set; } [Display(Name = "LastName", ResourceType = typeof(Resource))] [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "LastNameRequired")] public string LastName { get; set; } [Display(Name = "Email", ResourceType = typeof(Resource))] [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "EmailRequired")] [RegularExpression(@ "^([0-9a-zA-Z]([\+\-_\.][0-9a-zA-Z]+)*)+@(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]*\.)+[a-zA-Z0-9]{2,3})$", ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "EmailInvalid")] public string Email { get; set; } [Display(Name = "Country", ResourceType = typeof(Resource))] [Required(ErrorMessageResourceType = typeof(Resource), ErrorMessageResourceName = "CountryNameRequired")] public string Country { get; set; } } Go to Solution Explorer= > Right click on Project name= > Add= > Class => Enter Class name= > Add.(LanguageMang) public class LanguageMang { public static List AvailableLanguages = new List { new Languages { LanguageFullName = "English", LanguageCultureName = "en" }, new Languages { LanguageFullName = "French", LanguageCultureName = "fr-FR" }, }; public static bool IsLanguageAvailable(string lang) { return AvailableLanguages.Where(a => a.LanguageCultureName.Equals(lang)).FirstOrDefault() != null ? true : false; } public static string GetDefaultLanguage() { return AvailableLanguages[0].LanguageCultureName; } public void SetLanguage(string lang) { try { if (!IsLanguageAvailable(lang)) lang = GetDefaultLanguage(); var cultureInfo = new CultureInfo(lang); Thread.CurrentThread.CurrentUICulture = cultureInfo; Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture(cultureInfo.Name); HttpCookie langCookie = new HttpCookie("culture", lang); langCookie.Expires = DateTime.Now.AddYears(1); HttpContext.Current.Response.Cookies.Add(langCookie); } catch (Exception) { } } } public class Languages { public string LanguageFullName{get;set;} public string LanguageCultureName{get;set;} } Go to Solution Explorer= > Right click on Project name= > Add= > Class => Enter class name= > Add. Here, our Class name is “MyController”. public class MyController: Controller { protected override IAsyncResult BeginExecuteCore(AsyncCallback callback, object state) { string lang = null; HttpCookie langCookie = Request.Cookies["culture"]; if (langCookie != null) { lang = langCookie.Value; } else { var userLanguage = Request.UserLanguages; var userLang = userLanguage != null ? userLanguage[0] : ""; if (userLang != "") { lang = userLang; } else { lang = LanguageMang.GetDefaultLanguage(); } } new LanguageMang().SetLanguage(lang); return base.BeginExecuteCore(callback, state); } } HomeController public ActionResult Index() { return View(); } [HttpPost] public ActionResult Index(Registration r) { return View(r); } public ActionResult ChangeLanguage(string lang) { new LanguageMang().SetLanguage(lang); return RedirectToAction("Index", "Home"); } Index.cshtml @model MultiLanMVC.Models.Registration @{ ViewBag.Title = MultiLanMVC.Resource.Register; }

@MultiLanMVC.Resource.Register

@using (Html.BeginForm()) { @Html.AntiForgeryToken()

Registration


@Html.ValidationSummary(true, "", new{@class = "text-danger"})
@Html.LabelFor(model => model.FirstName, htmlAttributes: new{@class = "control-label col-md-2"})
@Html.EditorFor(model => model.FirstName, new {htmlAttributes = new{@class = "form-control"}}) @Html.ValidationMessageFor(model => model.FirstName, "", new { @class = "text-danger" })
@Html.LabelFor(model => model.LastName, htmlAttributes: new{@class = "control-label col-md-2"})
@Html.EditorFor(model => model.LastName, new{htmlAttributes = new{@class = "form-control"}}) @Html.ValidationMessageFor(model => model.LastName, "", new{@class = "text-danger"})
@Html.LabelFor(model => model.Email, htmlAttributes: new{@class = "control-label col-md-2"})
@Html.EditorFor(model => model.Email, new{htmlAttributes = new{@class = "form-control"}}) @Html.ValidationMessageFor(model => model.Email, "", new{@class = "text-danger"})
@Html.LabelFor(model => model.Country, htmlAttributes: new{@class = "control-label col-md-2"})
@Html.EditorFor(model => model.Country, new{htmlAttributes = new{@class = "form-control"}}) @Html.ValidationMessageFor(model => model.Country, "", new{@class = "text-danger"})
}
@Html.ActionLink("Back to List", "Index")
********************************************** _Layout .cshtml
@{ foreach (var i in MultiLanMVC.LanguageMang.AvailableLanguages) { @Html.ActionLink(i.LanguageFullName, "ChangeLanguage", "Home", new { lang = i.LanguageCultureName }, null) } }