Question

Our winforms application needs to be able to distribute ad-hoc translations in the *.resource format and use these in preference to the embedded translations. Is there a way to acheive this fall back strategy?

Was it helpful?

Solution 2

I've created a new class that can contain two ResourceManagers. These can be both a file based ResourceManager for the ad-hoc *.resource files and an assembly based ResourceManager for the embedded resource files.

If the ad-hock mode is enabled then the primary ResourceManager is file based with the second ResourceManager as an assembly based one used in a catch block as a fall back.

If the ad-hoc mode is dissabled the primary ResourceManager is an assembly based one and there is no secondary ResourceManager.

OTHER TIPS

Why the *.resource format. The .Net pattern is to use localised DLL files. See http://msdn.microsoft.com/en-us/goglobal/bb688110.aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top