How To: Build a Localized Version of Your Installer

Once you have described all the strings in your installer using language files, as described in How To: Make your installer localizable, you can then build versions of your installer for each supported language. This how to explains building the localized installers both from the command line and using Votive.

Option 1: Building localized installers from the command line

The first step in building a localized installer is to compile your WiX sources using candle.exe:

candle.exe myinstaller.wxs -out myinstaller.wixobj

After the intermediate output file is generated you can then use light.exe to generate multiple localized MSIs:

light.exe myinstaller.wixobj -cultures:en-us -loc en-us.wxl -out myinstaller-en-us.msi
light.exe myinstaller.wixobj -cultures:fr-fr -loc fr-fr.wxl -out myinstaller-fr-fr.msi

The -loc flag is used to specify the language file to use. It is important to include the -cultures flag on the command line to ensure the correct localized strings are included for extensions such as WiXUIExtension.

Option 2: Building localized installers using Votive

If a single language file is included in your Votive project it will automatically be used for strings when your MSI is built.

If you need to localize to multiple languages you will need to manually run light.exe on the intermediate output from your votive project with the appropriate command line, as described in Option 1 above. The intermediate output file is typically located in the obj\ folder under your project, so the command line will look like this when run from a command window in your project's obj\ folder:

light.exe myinstaller.wixobj -cultures:en-us -loc ..\en-us.wxl -out ..\bin\debug\myinstaller-en-us.msi
light.exe myinstaller.wixobj -cultures:fr-fr -loc ..\fr-fr.wxl -out ..\bin\debug\myinstaller-fr-fr.msi