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

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -