Authoring multi-language MSI packages

By default, Windows Installer packages are single-language only — no direct support for multi-language packages is currently provided. Creating a multi-lanuage installation package is thus a little more compex — the following provides a summary of the steps required:

  • Create an english package
    • Compile

      candle -dLANG=1033 foo.wxs

    • Link

      light -out foo.msi -loc strings-en.wxl foo.wixobj

  • Create the german (or whatever language) package
    • Compile

      candle -dLANG=1031 foo.wxs

    • Link

      light -out foo-de.msi -loc strings-de.wxl foo.wixobj

    • Create a transform describing the differences between german and englich package:

      msitran -g foo.msi foo-de.msi de.mst

    • Embed the transform in the english package:msidb -d foo.msi -r de.mst

The boostrapper has to decide which language the installer package should use. To use english, call msiexec without any special parameters. To use german, pass the parameter TRANSFORMS=:de.mst to msiexec, which directs it to apply the embedded transform named de.mst before running the package.

To avoid creating a bootstrapper, you might want to try this. See also: WiX tutorial, Lesson 8.

Advertisements

4 Responses to “Authoring multi-language MSI packages”


  1. 1 Joachim Back February 20, 2008 at 12:23 pm

    Thanks for your summarize.

    You can even have it easier at compile time, if you work with language id property LANG as a localized property.
    You put
    1031
    in your german wxl and
    1033
    in your english wxl.
    You also set the @WixLocalization/Culture property to de-DE resp. en-US.
    Then the steps easy up to

    1. candle foo.wxs
    2. light -out foo.msi -loc strings-en.wxl foo.wixobj
    3. light -out foo-de.msi -loc strings-de.wxl foo.wixobj
    4. msitran -g foo.msi foo-de.msi de.mst
    5. msidb -d foo.msi -r de.mst

    Since the light steps take long, also think about
    2. lit -bf -out foo.wixlib -loc strings-en.wxl -loc strings-de.wxl foo.wixobj
    3. light -cultures:”en-US” -out foo-de.msi foo.wixlib
    4. light -cultures:”de-DE” -out foo.msi foo.wixlib
    5. msitran -g foo.msi foo-de.msi de.mst
    6. msidb -d foo.msi -r de.mst

  2. 2 jpassing February 20, 2008 at 12:41 pm

    Thanks for sharing this, Joachim. This should definitely speed up the build process.

  3. 3 jan September 3, 2008 at 7:46 pm

    Many thanks for this article. It was very helpful for me, but I can’t do the last step: “The boostrapper has to decide which language the installer package should use.” Can you write a simple example of msbuild project that ilustrates how to do it?

    best regards, Jan


  1. 1 On Setup Bootstrap Loaders « JP’s Blog Trackback on May 24, 2009 at 4:28 pm
Comments are currently closed.



Categories




About me

Johannes Passing, M.Sc., living in Berlin, Germany.

Besides his consulting work, Johannes mainly focusses on Win32, COM, and NT kernel mode development, along with Java and .Net. He also is the author of cfix, a C/C++ unit testing framework for Win32 and NT kernel mode, Visual Assert, a Visual Studio Unit Testing-AddIn, and NTrace, a dynamic function boundary tracing toolkit for Windows NT/x86 kernel/user mode code.

Contact Johannes: jpassing (at) acm org

Johannes' GPG fingerprint is BBB1 1769 B82D CD07 D90A 57E8 9FE1 D441 F7A0 1BB1.

LinkedIn Profile
Xing Profile
Github Profile

%d bloggers like this: