MVC Check Messages - Localization?

I have a problem. On the main server and localhost, these are the same files.

But in localhost, I have messages in my native language, for example

Pole Email jest wymagane.

And on the main server I have:

The Email field is required.

As I said, the files look the same. How to solve it?

+4
source share
2 answers

Do you have

 <globalization enableClientBasedCulture="true" uiCulture="auto" culture="auto">...</globalization> 

in your web.config ? This will automatically switch the culture of the site in accordance with the language transmitted through the browser request, i.e. Accept-Language .

If you want to force the language from the server just set enableClientBasedCulture to false .

+9
source

I had the same problem, the solution for me was to install the appropriate language pack on the server ( https://support.microsoft.com/en-us/help/14236/language-packs ). Subsequently, after this verification message began to appear in the desired language.

+2
source

Source: https://habr.com/ru/post/1486381/


All Articles