Quantcast
Channel: DevNet Questions
Viewing all articles
Browse latest Browse all 8901

Experience 13 database based localization with .NET Core app

$
0
0
Hello,I'm trying to get resource strings out of the Localization application inside a .NET Core MVC app, which as I understand, should be done using the build-in IHtmlLocalizer. It seems like IHtmlLocalizer only works with .resx files, but doesn't query the database.If I use the code below, I get two different results. The first one just returns the key, because the key is not inside the .resx file, the 2nd one return the correct translation from the database.@HtmlLocalizer[key] @ResHelper.GetString(key) So ResHelper.GetString(key) still works as expected and I could use that in my views. However, I believe in order to translate data annotations on my view model properties, I rely on IHtmlLocalizer.How can I use IHtmlLocalizer or how can I translate data annotations using the database?Thanks

Viewing all articles
Browse latest Browse all 8901

Trending Articles