View Full Version : Localized custom action dll

07-26-2015, 04:54 AM

I'm using InstallShield 2015 Premier. My installation includes several languages. In my custom actions, I invoke functions that reside in C# DLL files. These DLL files should be localized and include their own resources.dll files the installation needs to take into account. However, I am uncertain of where to put it so that the messages these functions return will be localized. Please help.

07-27-2015, 08:37 AM
There are a couple layers of nuance here. One is that Windows Installer custom actions typically only get to use a single DLL. Our Managed Code support can actually support a couple more if you modify the ISClrWrap table entries accordingly. Alternately you can put all your files in the support files view and reference them there.

However you then get to the next layer of nuance: the selected locale may not match the user setting. Thus the standard localization approach, wherein the language is automatically selected, may not work. So you might have to reference the ProductLanguage (https://msdn.microsoft.com/en-us/library/aa370856.aspx) property and change your current thread locale accordingly.

If you're using an InstallScript project instead of a Basic MSI project, you'll definitely want to use the support files view, and instead of ProductLanguage you can reference SELECTED_LANGUAGE (http://helpnet.installshield.com/installshield22helplib/Subsystems/installshield22langref/helplibrary/LangrefSELECTEDLANGUAGE.htm).