asp.net mvc - How to customize .net resource files for different customer? -
i have asp.net mvc application uses resx files different languages. files existing in web project , 1 service layer.
i want customize labels specific customer (they have accounts , login our web app). possible to archive less code change?
have reached articles below switch use database seems require work.
https://stackoverflow.com/a/19277221/4903729 or https://msdn.microsoft.com/en-us/library/aa905797.aspx or http://afana.me/archive/2013/11/01/aspnet-mvc-internationalization-store-strings-in-database-or-xml.aspx/
seem using custom resource provider load customer based resx files difficulty thinking of is:
- how pass customerid resource provider.
- how load resource dll file custom directory \bin\de\customer1*.resources.dll or \bin\it\customer1*.resources.dll
thanks suggestion !
so have solution working ! (based on post afana), code change should less (create xml files, run resourcebuilder.exe).
what did customize little:
- modify
resourcebuilder
generate keys in partial class - manually create resources.provider.cs instantiates
xmlresourceprovider
individual customer or accepts default xml resource
- if helps here poc - change customerid / uiculture test.
Comments
Post a Comment