I have a c# .net MVC site, and I have correctly setup localization with resource files to work.
I have the following files which change the content when the culture changes: HelpText.en.resx HelpText.fr.resx
I now have a scenario where a second customer wants to customize some of the text elements. What I thought I could achieve was something like the following:
HelpText.Cust1.en.resx HelpText.Cust1.fr.resx
When the text was not found in the Cust1 resx, it would default back to the original one.
This doesn't seem possible utilizing resx.
How else can I achieve this?
Using resources is not the best way to do so. Think about situations in which the client needs more changes to a view than just a text. (eg style,images,...). One proven technique is having a way to totally customize any view for a customer if needed (Else default view is shown). I have provided a way that I have been using for years in this post using customizing a RazorViewEngine
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.