RickStrahl / Westwind.Globalization

Database driven resource localization for .NET applications
543 stars 135 forks source link

.net core - Dataannotation on other layer #115

Closed mtugnoli closed 6 years ago

mtugnoli commented 6 years ago

I have a project with DDD architecture, so I have dto (with dataannotations) in other layer respect, web pages. Is it possible to globalize dataannotations and ErrorMessage ?

RickStrahl commented 6 years ago

Not using the new .NET Core DI localization features AFAIK.

I think in class library projects DataAnnotation works the same as in classic projects which is you provide the resource id and resource set and use strongly typed resources. I haven't looked at that however.

The old way has been this: https://github.com/RickStrahl/Westwind.Globalization/wiki/Model-Validation-Message-for-ASP.NET-and-EntityFramework