Possible Duplicate:
Localization of DisplayNameAttribute
[Serializable]
public class Foo
{
[DisplayName("??")]
[Required]
public string Name { get; set; }
}
What is the best solution for localising this property?
Possible Duplicate:
Localization of DisplayNameAttribute
[Serializable]
public class Foo
{
[DisplayName("??")]
[Required]
public string Name { get; set; }
}
What is the best solution for localising this property?
You will have to use GlobalResources, check the example below
Resource1.resx
|Name|Name|
|....|....|
|....|....|
Resource1.da.DK
|Name|Navn|
|....|....|
|....|....|
[Required(ErrorMessageResourceType = typeof(Resources.Resource1), ErrorMessageResourceName = "Name")]
public virtual string Name
{
get;
set;
}