C# – In C#, How to create satellite resource that will be used at design time

clocalization

I am trying to localize an application, but I have a couple restrictions. I must use Resx-based localization (I cannot use LocBaml). Also, all resources, including the fallback resource (en-US), must be stored in a satellite assembly. No resources can be embedded with the application.

Here's my problem. Every time I add a string, I must add it to Resources.resx and then add the same string to the fallback resource, Resources.en-US.resx. If I understand it correctly, the Resources.resx file is used at compile/design time, while the Resources.en-US.resx files ends up being the one used at runtime. Is there any way around this? Can I somehow link the two so that only one file will need to be changed?

Best Answer

How about a simple pre-Build action that copies your default .resx file(s) to the en-US version? I seem to remember that the culture-codes are not recorded inside, so a simple Copy File would do.

Related Topic