views:

599

answers:

1

What is the best way to load a locale-specific (i.e. translated) compiled help file (.chm)? Our install will deploy them alongside the satellite assemblies containing resources. I'd like to re-use the same probing rules the .NET framework uses to load the satellite assemblies, and I'd definitely like to avoid writing my own searching algorithm, because for example, I'd have to handle specific cases such as "zh-CN/zh-Hans/zh-CHS".

I can't find anything with the System.Windows.Forms.Help class that indicates that you can provide a CultureInfo object to specify a particular culture. Anybody else run across this yet? Thanks!

+3  A: 

Off hand, I would suggest that instead of deploying your CHM file side by side with the satellite assembly, that you actually include the CHM as an embedded resource in the satellite assembly itself. Remember that an assembly can actually be contained across multiple files. What makes an assembly and assembly is the manifest.

By doing that, you can then request the resource for the current locale programatically, let the framework tell you the URL, and then supply that file location to the Help class.

Nick
That is a really good idea! Unfortunately our build process (and schedule) won't allow it, but it's definitely the best answer I've come across yet.Thanks!
Aaron Lerch