I read articles about globalizing asp.net core application. All of them suggests to create 'Resources' folder and create sub folders and for each Controller/View/ViewModel, create resource file for each language. Is there a better way to do this, just having one resource file per language? If yes, what change I need to make in startup.cs file?
Asked
Active
Viewed 150 times
1 Answers
0
Is there a better way to do this, just having one resource file per language?
Globalization with help of SharedResource, you could refer to the below :
SharedResource.cs
, put it in the root folder of project and it does not need to contain any data, just the class declaration.create a resource file called the same as the .cs file and it needs to be put in the Resources folder.
For the usage of SharedResource file , you could refer to below links:
https://learn.microsoft.com/en-us/aspnet/core/fundamentals/localization?view=aspnetcore-3.1

Xueli Chen
- 11,987
- 3
- 25
- 36