Base solution for your next web application
Open Closed

Localization for DataAnnotations #281


User avatar
0
ademg created

Is there a way to do something like this for DTOs / ViewModels

[Required(ErrorMessage = L("Password", Constants.LocalizationSourceName)] public string Password { get; set; }

Or any other way to localize the data annotations so we dont need to end by localizing the html on the views.


2 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    I think that it should work if you use resx files with classic approach. But, it would be good to directly support this approach in ABP. I created an issue for that: <a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/issues/582">https://github.com/aspnetboilerplate/as ... issues/582</a>

    Thanks.

  • User Avatar
    0
    ademg created

    For the moment I managed it like you said on [http://forum.aspnetboilerplate.com/viewtopic.php?f=2&t=116&p=239&hilit=resource#p239])