c# - How do I localize data annotations messages in MVC3? -
possible duplicate:
localization of displaynameattribute
[serializable] public class foo { [displayname("??")] [required] public string name { get; set; } }
what best solution localising property?
you have use globalresources, check example below
resource1.resx
|name|name|
|....|....|
|....|....|
resource1.da.dk
|name|navn|
|....|....|
|....|....|
[required(errormessageresourcetype = typeof(resources.resource1), errormessageresourcename = "name")] public virtual string name { get; set; }
Comments
Post a Comment