4

I have a set of standard (en-GB) resource files.

I have translated versions of these files for each language I will implement (French, Japanese).

These are "generic" and all customers will receive them.

Some customers want to override certain resource strings. These will need to be done for each language.

So...

ResourceFile1.resx

ResourceFile2.resx


ResourceFile1.fr-FR.resx

ResourceFile2.fr-FR.resx

ResourceFile1.ja-JP.resx

ResourceFile2.ja-JP.resx


ResourceFile1.Customer1.fr-FR.resx

ResourceFile2.Customer1.fr-FR.resx

ResourceFile1.Customer2.fr-FR.resx

ResourceFile2.Customer2.fr-FR.resx

ResourceFile1.Customer1.ja-JP.resx

ResourceFile2.Customer1.ja-JP.resx

ResourceFile1.Customer2.ja-JP.resx

ResourceFile2.Customer2.ja-JP.resx

The customer and the language will be specified in the web.config.

I can set the globalization to easily use the chosen language...

<globalization culture="ja-JP" enableClientBasedCulture="false" uiCulture="ja-JP" />

...but how can I also specify the customer?

Is there a built in method (I can't find after lots of googling)?

Is my only option a custom resource provider?

Any input is appreciated! Thanks

Edit 1:

The idea is. 1) If the resource exists in the client/language specific file... use that. 2) Otherwise, if the resource exists in the language specific (generic) file... use that. 3) Otherwise, use the resource from the standard (en-GB) file.

Edit 2:

All resource files need to be deployed to all customers. We deploy a single version of code to each customer application and dynamically load the web.config on application start.

Beakie
  • 1,948
  • 3
  • 20
  • 46
  • Do you really need your customers to see the resource files of all your other customers? If possible, just distribute one set of customer resource files to each customer. – Oliver Nov 03 '15 at 14:44
  • (Ideally) I would like a single version of code. The customers can't access the files themselves. – Beakie Nov 03 '15 at 14:46
  • The customer specific files won't contain much. Just the odd string overridden. – Beakie Nov 03 '15 at 14:46
  • I assume you don't want to distribute customer 1's files to customer 2. I also assume you need to set some config variable somewhere for each customer so that the proper files get used. If that is true, would it be feasible to have your build process make the customer specific transforms before the code is shipped? – Becuzz Nov 03 '15 at 14:58
  • I want to give Customer1 to Customer2. That's how we deploy. Identical source with dynamically loaded web.config depending on customer. – Beakie Nov 03 '15 at 15:06
  • Possible duplicate of [How to load different RESX files based on some parameter](http://stackoverflow.com/questions/3635390/how-to-load-different-resx-files-based-on-some-parameter) – George Polevoy Nov 11 '15 at 19:40

0 Answers0