0

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?

Jeremy
  • 23
  • 6

1 Answers1

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 :

  1. SharedResource.cs , put it in the root folder of project and it does not need to contain any data, just the class declaration.

  2. create a resource file called the same as the .cs file and it needs to be put in the Resources folder. enter image description here

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

ASP.NET Core Localization with help of SharedResources

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