'Is there a way to have subfolder for every razor page when doing localization?

I have multiple razor pages which I would like to provide in multiple languages and I was wondering if I could create a folder structure for localization so that each page has its own subfolder.

For example, I have the following file:

Pages/GetData.razor

When I put the resources files in following path everything works ok:

Resources/Pages/GetData.en.resx
Resources/Pages/GetData.de.resx

But what I really want is to have a subfolder for every page:

Resources/Pages/GetData/GetData.en.resx
Resources/Pages/GetData/GetData.de.resx

Is there a way to do this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source