Answer the question
In order to leave comments, you need to log in
How to force locale in ASP MVC?
Hello!
it is necessary that the validation messages be in Russian ... registered in the webconfig:
<system.web>
<globalization uiCulture="ru-RU" culture="ru-RU" />
protected void Application_BeginRequest()
{
System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("ru");
System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("ru");
}
[Required (ErrorMessage = "Обязательно для заполнения")]
Answer the question
In order to leave comments, you need to log in
In the controller, check the locale, if necessary - check the resources, maybe something is wrong with them.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question