我实现与asp.net的MVC 3
一个多语种的网站有朋友建议我这个项目https://github.com/danielcrenna/i18n使用i18n.DataAnnotations。它究竟如何工作?
直到现在我还succeded,使其在控制器和视图(剃刀)工作,而不是在数据注解。
例如
public class LogOnModel
{
[i18n.DataAnnotations.Email]
[Required(ErrorMessage = "Required Field")]
[i18n.DataAnnotations.DataType(DataType.EmailAddress)]
public string Email { get; set; }
[i18n.DataAnnotations.Required(ErrorMessage = "Required Field")]
[DataType(DataType.Password)]
[i18n.DataAnnotations.Display(Name = "Password")]
public string Password { get; set; }
[i18n.DataAnnotations.Display(Name = "Remember me?")]
public bool RememberMe { get; set; }
}
上面一段代码应该产生在.po文件的新条目,每当构建成功。但是什么也没有发生。
有没有人知道这件事? 在此先感谢!
我与丹尼尔Crenna国际化项目同样的问题。你解决了吗? –