D
D
Dmitry Filandor2016-12-17 17:36:52
IIS
Dmitry Filandor, 2016-12-17 17:36:52

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" />

and in globalajax:
protected void Application_BeginRequest()
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("ru");
            System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo("ru");
        }

but still - joxi.ru/gV2VeYZiZOXgmv how else can you force it? Hosting is kind of a bummer.
UP:
as a temporary measure made in the model:
[Required (ErrorMessage = "Обязательно для заполнения")]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Kuznetsov, 2016-12-17
@LifeAct

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 question

Ask a Question

731 491 924 answers to any question