I have a website that goes out to multiple clients. Sometimes a client will insist on minor changes. For reasons beyond my control, I have to comply no matter how minor the request. Usually this isn't a problem, I would just create a client specific version of the user control or page and overwrite the default one during build time or make a configuration setting to handle it.
Now that I am localizing the site, I'm curious about the best way to go about making minor wording changes.
Lets say I have a resource file called Resources.resx
that has 300 resources in it. It has a resource called Continue
. English value is "Continue", the French value is "Continuez".
Now one client, for whatever reason, wants it to say "Next" and "Après" and the others want to keep it the same. What is the best way to accomodate a request like this? (This is just a simple example).
The only two ways I can think of is to
ClientName.resx
instead of Resources.resx
.Are there any other things I could try? Is there any way to change it so that the application will always look in a ClientResources.resx
file for the overridden values before actually look at the specified resource file?
You could perhaps use the following template :
#if ClientName1
Continue="Next";
#elif ClientName2
Continue="Apres";
#else
Continue="Continue"
#endif
This allows you to specify all possible values in the same file (and the same variable in the same region), and you can easily define the symbol "ClientName1" from the commandline during the build.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With