Matthew
Matthew

Reputation: 5202

Using client-customized resources (resx) as well as default resources

I'm trying to find info on how best to allow localization and client-customization of resource files.

It will be simple to give a demo, but first what I am doing: We have an app that is a product, but we allow clients to customize that product.

What I want (I think) is to create out product with a message "Welcome" (English) and "Welkom" (Afrikaans). The product needs to support different languages.

But, the client is allowed to change "Welcome" to "Hey Again" in the English resources.

However we release an update (say v2) and we add a new key "Bye" to the resources.

What is the best practice to prevent overriding the client's customizations, but update the default resources so that it is now at the latest version with both keys?

In pseudo-code:

Load default resources (English) - this is done by .NET
Load default regional resources (Afrikaans) - this is done by .NET
Load the client resources (English) - ?
Load the client regional resources (Afrikaans) - ?

Thus, the final request for "Bye" in any language returns "Bye" (new), but the final request for "Welcome" in English returns "Hey Again" (client) and "Welkom" (default) in Afrikaans.

Upvotes: 2

Views: 727

Answers (1)

Remy
Remy

Reputation: 12703

As T.S. mentioned above, I would also recommend a database resource provider.

http://msdn.microsoft.com/en-us/library/aa905797.aspx

Depending on your application, you can use the standard MS SQL Resource provider or customize it in case it's an app where MS SQL makes no sense.

Upvotes: 1

Related Questions