我必须强烈反对您迄今为止收到的所有答案。他们都没有真正回答您提出的问题,即如何本地化 MVC 错误消息。如果您没有真正本地化您的应用程序,您可能会花费大量精力来解决这个问题的单个实例,并且在其他 50 个 MVC 错误消息案例中仍然存在相同的问题。它们在 MvcResources.resx 中定义,该文件位于 MVC 源代码的 Resources 文件夹中(或者只是使用 Reflector 浏览程序集)。特别是,您正在寻找Common_ValueNotValidForProperty
resource. You would localize these messages by providing a localized satellite assembly, in the same way that you localize any .NET application. The specifics of internationalization/localization in .NET applications are outside of the scope of this answer, but there are many books on the subject. Doing this in MVC is no different than doing it in any other application, except that, in most cases, localizations of the framework are already available. MVC is still in beta, so it is, as far as I know, English-only, at the moment. Presumably, that will change after release.