[wix-users] Multilingual MSI installer

Barry Leslie Barry.Leslie at TeamDrive.com
Thu Nov 22 15:16:23 PST 2018

For the benefit of anybody with a similar problem here is how I solved this. 

There may be better ways to do this and I think the people at add-in-express provide tools to do all of this for you.
See: https://www.add-in-express.com/docs/wix-multi-language-setup.php <https://www.add-in-express.com/docs/wix-multi-language-setup.php>

As of November 22 2018 this seems to work.

This link explains how to set this up:

But like most info on this it is out of date.

In your Visual Studio properties add all the cultures you want to build for and in the ’Tool Settings’ add the linker option ‘-sval’. The linker option deactivates MSI validation which will fail because of the ‘Languages’ you set in the WIX project. Your wix project should look something like this:

<Product Language="!(loc.ID)"> <!-- Other attributes skipped --> 
    <Package Languages="1029,1031,1033,1049,3072" /> <!-- Other attributes skipped --> 
    <!-- Other tags skipped --> 

NOTE: loc.ID is set in each of your .wxl files for that language.

Have Visual Studio build the installers for all the supported cultures.
Use  this script which I will call mergeInstaller.bat:
call "%VSINSTALLDIR%\Common7\Tools\VsDevCmd.bat"
set MsiName=%1
set BasePath=%2
set TransPath=%3
set langcode=%4
set DestPath=%5
if not exist %DestPath%\%MsiName% copy %BasePath%\%MsiName% %DestPath%
MsiTran.exe -g %BasePath%\%MsiName% %TransPath%\%MsiName% %langcode%
MsiDB.exe -d %DestPath%\%MsiName%  -r %langcode%
rm %langcode%

The script is then called after the project has been built for each language you support:

mergeInstaller.bat MyInstaller.msi bin\en-US bin\de-DE 1031 bin
mergeInstaller.bat.bat MyInstaller.msi.msi bin\en-US bin\de-DE 1031 bin

Note that this script doesn’t use the VSB scripts mentioned in the link. I do not think they are supplied anymore probably because there are now msi developer tools to do the job.

The msi installer in ‘bin’ should now be able to switch to the display language of the machine on which it is being installed.


> On Nov 20, 2018, at 2:45 PM, Barry Leslie via wix-users <wix-users at lists.wixtoolset.org> wrote:
> Hi,
> I have been trying to build a Multilingual MSI installer with out any luck.
> I have been following the instructions here: 
> https://www.packtpub.com/mapt/book/application_development/9781849513722/12/ch12lvl1sec79/creating-a-multi-language-msi <https://www.packtpub.com/mapt/book/application_development/9781849513722/12/ch12lvl1sec79/creating-a-multi-language-msi>
> as well as here: 
> http://www.installsite.org/pages/en/msi/articles/embeddedlang/ <http://www.installsite.org/pages/en/msi/articles/embeddedlang/>
> and here:
> https://www.hass.de/content/how-create-msi-packages-multilingual-user-interface-mui <https://www.hass.de/content/how-create-msi-packages-multilingual-user-interface-mui>
> I was able to use msiTrans and msidb to build an msi package that could install in German or English when started from the command line with:
> msiexec  myInstaller.msi TRANSFORM=“:de-DE.msi"
> But what I want is a single msi package that when opened will start the installation process in the users language. 
> Here is what I have done:
> 1) Build a German and an English version of myInstaller.msi 
> 2) Copy the English  myInstaller.msi into the folder with the Gernam  myInstaller.msi renaming it  myInstaller_en.msi
> 3) torch -t language  myInstaller.msi myInstaller_en.msi -out en.mst
> 4) cscript WiSubStg.vbs myInstaller.msi  en.mst 1033
> 5)  cscript WiLangId.vbs myInstaller.msi  Package 1033,1031
> If I then click  myInstaller.msi  to install it I would expect it to start in English because it is running on an English system but it starts in German.
> One significant note, I am using wix tool set v4.0. I inherited this project and the original developer told me he used v4.0 rather than v3.11 because it had a bug fix the other did not, I think the bug had something to do with VM machines. I do not know if this is actually true or not. The torch that came with v4.0 didn’t work where the v3.11 torch did so that may also be the problem.
> All the references to this build process seem to be fairly old so I do not know if this is the current state of the art or if there is a better way to do this.
> Any help at all on this would be appreciated. 
> At this point I am considering switching to the current V3 wix tool set and hope that the VM bug was not real or there is a better work around for it.
> Barry
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

Barry Leslie
Senior Software Engineer

TeamDrive Systems GmbH

Canadian Office
Tel: (001) 250 884 1820
Fax: (001) 250 595 4460
Email: Barry.Leslie at T <mailto:Barry.Leslie at PrimeBase.org>eamDrive.com
Web: www.TeamDrive.c <http://www.primebase.org/>om

TeamDrive Systems GmbH
Max-Brauer-Allee 50
22765 Hamburg • Germany

Geschaeftsfuehrung: Ulrich Zimmer,  Detlef Schmuck

More information about the wix-users mailing list