Это будет довольно ужасно быстро.
public class User
{
[Required(ErrorMessageResourceName = "Validation_Required", ErrorMessageResourceType = typeof(ModelTranslations))]
public int Id { get; set; }
[Required(ErrorMessageResourceName = "Validation_Required", ErrorMessageResourceType = typeof(ModelTranslations))]
[StringLength(40, ErrorMessageResourceName = "Validation_StringLength", ErrorMessageResourceType = typeof(ModelTranslations))]
public string FirstName { get; set; }
[Required(ErrorMessageResourceName = "Validation_Required", ErrorMessageResourceType = typeof(ModelTranslations))]
[StringLength(40, ErrorMessageResourceName = "Validation_StringLength", ErrorMessageResourceType = typeof(ModelTranslations))]
public string LastName { get; set; }
}
Я нашел более красивое решение в своем блоге: http://blog.gauffin.org/2010/11/simplified-localization-for-dataannotations/