2

I'm new to WIX and i'm using Wix 3.8 VS 2012. I managed to Generate .msi to .exe using this amazing tool.

From this tutorial : http://max.zamorsky.name/node/78, I managed to change the installer to French. I would like to make a multilingual installer which the installer could detect the system language & proceed to install.

I tried to understand this link:http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Localized-bundle-Picking-up-the-right-files-td7265208.html but i couldn't understand.

Please guide me that how can i make this type of installer? Need your help & thank you.

Bundle.WXS

<?xml version="1.0" encoding="UTF-8"?>
<?define SourceDirImages = "C:\Users\krangaraj\Documents\Visual Studio 2012\Projects\PrintUtility\SetupProjectInstaller" ?>
<?define SourceDoc = "C:\Users\krangaraj\Documents\Visual Studio 2012\Projects\PrintUtility\PrintUtilityExe" ?>

<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
         xmlns:bal="http://schemas.microsoft.com/wix/BalExtension">
    <Bundle Name="PrintUtility" Version="1.5" Manufacturer="DNP PIE SAS" IconSourceFile="PartyPrintInstaller.ico"
          UpgradeCode="7ba74925-c154-4939-9c2e-a531eac0cd8a" >
    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" >
      <bal:WixStandardBootstrapperApplication SuppressOptionsUI="yes" SuppressRepair="yes"
        LicenseFile="$(var.SourceDoc)\sample.rtf" ThemeFile="HyperlinkTheme.xml"
        LocalizationFile="HyperlinkTheme.wxl"
        ShowVersion="yes"
        LogoFile="$(var.SourceDoc)\logo.jpg" LogoSideFile="$(var.SourceDoc)\SideLogo.jpg"/>

      <!--For the French language -->
        <Payload Compressed="yes"  Name="1036\thm.wxl" SourceFile="1036\thm.wxl"/>

      <!-- I would like to add German,Greek,English,Es,It,Jp,Ru,Turkish make a common installer  

      <Payload Compressed="yes"  Name="1031\thm.wxl" SourceFile="1031\thm.wxl"/>
      <Payload Compressed="yes"  Name="1032\thm.wxl" SourceFile="1032\thm.wxl"/>
      <Payload Compressed="yes"  Name="1033\thm.wxl" SourceFile="1033\thm.wxl"/>
      <Payload Compressed="yes"  Name="1034\thm.wxl" SourceFile="1034\thm.wxl"/>
      <Payload Compressed="yes"  Name="1040\thm.wxl" SourceFile="1040\thm.wxl"/>
      <Payload Compressed="yes"  Name="1041\thm.wxl" SourceFile="1041\thm.wxl"/>

      <Payload Compressed="yes"  Name="1049\thm.wxl" SourceFile="1049\thm.wxl"/>
      <Payload Compressed="yes"  Name="1055\thm.wxl" SourceFile="1055\thm.wxl"/>-->


    </BootstrapperApplicationRef>
    <Chain>
      <!-- TODO: Define the list of chained packages. -->
      <MsiPackage  SourceFile="$(var.SourceDirImages)\Product.msi"/>
    </Chain>

  </Bundle>
</Wix>
linguini
  • 1,939
  • 5
  • 49
  • 79

1 Answers1

3

Assuming that you don't plan to use a bootstrapper that chooses the language and then starts the MSI with the appropriate language transform, you can use the method described on the following site: http://www.installsite.org/pages/en/msi/articles/embeddedlang/

Please note that the method is unsupported by Microsoft, but I had no negative experience with it. Also note that not the UI language of Windows is used to detect the language, but the Standards and format options of Windows.

It basically consists of the following steps:

  • Create your base MSI file with the base / fallback language, most of the times it will be English.
  • Create your language transform files, one for each language. If the UI will not change and you change only UI items, you can reuse these transform files for further builds.
  • Add the language transforms as streams, using a VBScript-script from the Windows SDK.
  • Update the language entry of the summary information stream to reflect the included languages.

During installation, the initial dialog will pop-up which checks for the configured language, then the UI is shown in the correct language.

As said: this method worked great for me for an installer and > 20 languages.

taffit
  • 1,979
  • 22
  • 23
  • Thank you for your explanation. How can i use the WIX 3.8 to add multiple language? thank you. – linguini Feb 11 '14 at 13:46
  • Could you elaborate a little bit on your intentions? Would you like to: – taffit Feb 11 '14 at 17:11
  • Could you elaborate a little bit on your intentions? Would you like to: - Create multiple Windows Installer files, one for each language? In this case you can use the WiX mechanism with localization-files, as described e.g. [here](http://wix.tramontana.co.hu/tutorial/user-interface/do-you-speak-english) or [here](http://wixtoolset.org/documentation/manual/v3/howtos/ui_and_localization/make_installer_localizable.html) - Create one installer that switches to the language of the operating system and installs then normally? In this case use the mechanism described above. – taffit Feb 11 '14 at 17:17
  • Thank you very much fo ryou additional comments. I understood how can i do this. I have a system that one user setting is in French and admin Login is English; in that case, How can i verify the base language of the system `Using the SystemLanguageID or UserLanguageID property.` and continue the installation? Thank you! – linguini Feb 12 '14 at 07:10
  • 1
    Depending on the Windows Installer version that you can build upon, you could either use the [SystemLanguageID-property](http://msdn.microsoft.com/en-us/library/aa372056(v=vs.85).aspx) or e.g. read the user or system language from the registry, see e.g. [here](http://windowsitpro.com/systems-management/where-registry-language-setting-each-user-stored) or do a search for `system language registry`. You could simply use the [RegistrySearch-tag](http://wixtoolset.org/documentation/manual/v3/howtos/files_and_registry/read_a_registry_entry.html) from WiX to set a property accordingly. – taffit Feb 12 '14 at 08:36
  • Amazing thank you. Need another suggestion, I'm launching a third party application as a `prerequisites`but it's launching behind the original windows. Is it possible to bring it to front? Do i have to post a new question? Thank you. – linguini Feb 12 '14 at 08:48
  • 1
    EDIT: Sorry, didn't read the question properly. CA 71 could help here or launching an AutoHotkey-exe that brings it to the front. ---I'm new here, but as far as I understood this should be a new question. Depending on the prerequisite you could either launch it by a custom action (`CustomAction`-attribute `ExeCommand`) or using the (deprecated) custom action types `71` for installation and `103` for uninstallation. As WiX doesn't support the latter ones, you would have to add the entries using a VBScript. – taffit Feb 12 '14 at 09:13