I have dealt with localization of many .net Core 2.2 applications.
I am working now on a .net Core 3.1 localized application
In the Startup.cs ConfigureServices I have
services.AddLocalization(o =>
{
// We will put our translations in a folder called Resources
o.ResourcesPath = "Resources";
});
services.AddControllersWithViews()
.AddViewLocalization(LanguageViewLocationExpanderFormat.SubFolder)
.AddDataAnnotationsLocalization()
.AddNewtonsoftJson();
In the Configure method I define my cultures and such and include
app.UseRequestLocalization(localizationOptions);
I have a folder structure for my resources that looks like this:
My views are all localizing perfect. However none of the models/Data annotations or controllers will localize even though they are named correctly and placed in the models or controllers folder.
In prior 2.2 using the folder structure worked flawlessly for me. Have I missed something new under 3.1 that should be telling it to look in the folder differently? Should the folder not be named Models but something else?
I have looked in all the docs, searched online, but am coming up short.
Updated See Answer below