0

I'm using ASP.NET Core IStringLocalizer interface to implement localization and localize strings in my web application. Currently, I add or remove resx file records in VisualStudio and publish them. but I want that admins to be able to change records online. How can I get a list of SharedResource records by culture, display them online and change them in admin panel?

Actually, I want to know what classes or interfaces have access to resx files and can manage their data!

I don't want to use SQLLocalizer.

Saleh Bagheri
  • 424
  • 4
  • 19

1 Answers1

1

this solution is for MVC3, but could help! However, editing resx files during runtime is not recommended:

Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the ReleaseAllResources method. If you want to deploy resources with your ASP.NET apps, you should compile your .resources files into satellite assemblies.

You can use ResourceManager class to access resources programmatically, but you have to use it carefully;

Calling methods from this class with untrusted data is a security risk. Call the methods from this class only with trusted data.

for more details see the docs

LazZiya
  • 5,286
  • 2
  • 24
  • 37