MVC验证消息 - 本地化? [英] MVC validation messages - localization?
本文介绍了MVC验证消息 - 本地化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个问题。在主服务器和本地主机是exacly相同的文件。
I have a problem. On main server and localhost are the exacly the same files.
但在本地主机我的邮件在我的家乡语言,如
But in localhost I have messages in my home language, like
群组电子邮件笑话wymagane。
和主服务器上我有:
电子邮件字段是必需的。
就像我说的,文件是exacly相同。
如何解决呢?
As I said, files are exacly the same. How to resolve it?
推荐答案
你碰巧有
<globalization enableClientBasedCulture="true" uiCulture="auto" culture="auto">...</globalization>
在的web.config
?这将自动切换网站的文化,以适应通过浏览器请求中所传递的语言,即接受语言
。
in your web.config
? This would automatically switch the culture of the site to suit the language passed via the browser request i.e. Accept-Language
.
如果您想从刚才设置的服务器强制语言 enableClientBasedCulture
到假
。
If you want to force the language from the server just set enableClientBasedCulture
to false
.
这篇关于MVC验证消息 - 本地化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文