如果我裝飾我的ViewModels的屬性,像這樣的屬性:本地化數據註釋缺省消息([必需] [StringLength]等)
public class Vm
{
[Required]
[StringLength(35)]
public string Name {get;set;}
}
我會得到英語驗證消息:
"this field is required"
"The field Name must be a string with a maximum length of 35"
我怎麼翻譯它們?
我這裏介紹我的方法: http://stackoverflow.com/questions/19398691/ mvc-localization-from-the-database-that-covers-all-messages-required-displayna – 2013-10-16 08:37:56