I have created a Resources
folder inside my ASP.NET Core solution and have created resx files for translations. I have resx files for models, pages and controllers. I would like to know where to put a resx file inside the Resource
s folder when there is a inputmodel inside a pagemodel?
This is an old question and maybe not relevant now, but I just had the same problem and was able to figure it out, so I'll add what worked for me.
It is really just a minor detail. If we want the resource for the page model, we would have Resources\Pages\IndexModel.en.resx
, for a class that's internal to that page model, we add a +InnerModel
, ending up with Resources\Pages\IndexModel+InnerModel.en.resx
I created a GitHub repository with a working sample here -> https://github.com/joaofbantunes/AspNetCoreRazorPagesInnerModelLocalizationSample
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