I have been able to successfully run an asp.net mvc6 localization sample app however all the .resx files are placed in one "resources" folder.
If you have a look at this sample application You will notice that all the resources are placed in the root directory folder: "Resources" and it is referenced in the Startup.cs file like this:
services
.AddMvc()
.AddViewLocalization(options => options.ResourcesPath = "Resources")
.AddDataAnnotationsLocalization();
The current application I am working on has multiple areas and ideally I would like to better organize these .resx files. Otherwise it's going to get very messy.
Is this even possible yet in MVC6?
One possible thing you can do is to create seperate folders per area in your resource route folder. In those "area folders" you can create several specific resource files.
Seems quite manageable to me.
For ex.
Resources
You can store resource (and not just resource files - for example I store my translations in json file) where ever you want. You just have to override:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With