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

How do you change vbulletin's home page to the forums instead of the default (CMS or Activity Stream)? -

c++ - Troubles when compiling phash program -