It looks for the strings in all of the .wxl files sorting them in order of
Culture, based on the order of the -Cultures parameter followed by the order
the wxl files appear in the commandline.

Example without using cultures, but placing the wxl files in numbered order:

One.wxl:
...<String Id="one">This is the override</String>...

Two.wxl:
...<String Id="one">This is an override</String>...
...<String Id="two">This is the second</String>...
...<String Id="four">This is the fourth</String>...

Three.wxl:
...<String Id="one">This is the original</String>...
...<String Id="two">This is another one</String>...
...<String Id="three">And yet another one</String>...

Then:
<Property Id="ONE" Value="!(loc.one)"/>
<Property Id="TWO" Value="!(loc.two)"/>
<Property Id="THREE" Value="!(loc.three)"/>
<Property Id="FOUR" Value="!(loc.four)"/>

Results:
ONE: This is the override
TWO: This is the second
THREE: And yet another one
FOUR: This is the fourth

If each of the above .wxl files had a culture of "en-US" and you added a
fourth .wxl file with a culture of "en-HK" containing the following:
...<String Id="one">Welcome to Hong Kong</String>...
...<String Id="three">Please come again</String>...

And then rebuilt using a -Cultures:en-HK,en-US parameter

Results:
ONE: Welcome to Hong Kong
TWO: This is the second
THREE: Please come again
FOUR: This is the fourth

In other words, in culture-order, search each WXL that exactly matches that
culture until you find a matching string.

Any given single MSI in the end understands just one "language", based on
the ProductLanguage tag (comes from produ...@language) and the content (a
single value for each and every string). Everything else we do is intended
to change that MSI's content so that a different language becomes apparent.
That is where we re-link with different languages in order to generate the
transforms that set our base MSI to those different languages. At that
point, you can vary just the Cultures parameter and all WXL files that don't
match the culture are ignored, so the command-line variation between the
different links is minimal and easily controlled for.

-----Original Message-----
From: Markus KARG [mailto:markus.k...@gmx.net] 
Sent: Tuesday, October 20, 2009 3:01 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Beginner's Question on Multi Language Installer

Blair,

thank you for your kind help.

To sum up, multi-language support actually (or: "officially") is not
possible with a single .msi (or at least, not without either patching or
transforming it before installation).

What I do not understand under this circumstances is: Why can I add a LIST
of cultures to light.exe? I mean, what does it actually do with all the
cultures if actually always taking just the first in the list?

Thanks
Markus

> -----Original Message-----
> From: Blair [mailto:os...@live.com]
> Sent: Dienstag, 20. Oktober 2009 21:53
> To: 'General discussion for Windows Installer XML toolset.'
> Subject: Re: [WiX-users] Beginner's Question on Multi Language
> Installer
> 
> You get German since that is the first one in your list of Cultures.
> 
> MSI has never officially supported the scenario you describe directly.
> You
> are perfectly free to create per-language transforms and use an .EXE
> file to
> install your MSI with those transforms (the supported way). There are
> some
> who have had success with embedding those same transforms based on a
> particular naming convention and having them auto-selected by the OS
> (not
> supported, but I'm told it works). There may or may not be issues with
> generating working MSP files if you use those transforms (you may have
> to
> mess with the transform applicability rules of the patch-supplied
> transforms
> depending on what the original language transforms did).
> 
> You may be able to use the instance transform related tags in WiX, but
> I
> have never tried that so I don't know what gotchas you may find that
> way.
> Otherwise you may be able to link each language separately into .wixout
> files, generate your transforms from those, and bind the "baseline"
> wixout
> into the MSI you subsequently apply each MST to.
> 
> -----Original Message-----
> From: Markus KARG [mailto:markus.k...@gmx.net]
> Sent: Tuesday, October 20, 2009 12:06 PM
> To: wix-users@lists.sourceforge.net
> Subject: [WiX-users] Beginner's Question on Multi Language Installer
> 
> Hello Everybody,
> 
> 
> 
> I am new to both, MSI technology in general and the WiX product in
> particular, but I have some experience with some old InstallShield
> products
> (pre-MSI-age).
> 
> 
> 
> InstallShield allowed me to simply add translated strings for lots of
> languages, so one single setup.exe contained the installer in multi
> languages. This was very smart since I was able to send the same
> setup.exe
> to any country of the world.
> 
> 
> 
> Now I want to write an installer with WiX that is also multi language
> (I
> don't want to have lots of setup.msi files, but only a single one).
> 
> 
> 
> I wrote several .wxl files and linked them together using a line like
> this
> one:
> 
> 
> 
> light.exe -cultures:de,neutral;fr,neutral;en,neutral;neutral -loc
> de.wxl
> -loc fr.wxl -loc en.wxl -loc neutral.wxl Setup.wixobj
> 
> 
> 
> (While actually told nowhere, it seems that neutral.wxl must contain '
> .culture="". ' [i. e. empty string] to indicate that it is the neutral
> culture. I found out that by trial and error when adding the neutral
> fallback to each culture).
> 
> 
> 
> What I expect to get from light.exe is one single .msi file containing
> all
> four language packs: German, French, English and Neutral. Light
> provides a
> single .msi so "from the outside" it seems to work.
> 
> 
> 
> My target is that the Windows Installer at install time picks German,
> French
> or English strings automatically, depending on the user's current
> "Region
> and Language Settings" or instead picks neutral strings when the
> current
> user's local setting is neither German, French nor English (for
> example,
> "Polish" / "Poland").
> 
> 
> 
> While light v3 accepts the above line and does not complain in any way
> (not
> even ICE warnings), the Windows Installer picks Germany *always* when
> running the resulting .msi file on my laptop -- despite the current
> setting
> of "Polish" / "Poland" in the "Region and Language Settings" control
> panel.
> :-(
> 
> 
> 
> Can anybody tell me what my fault is?
> 
> 
> 
> Thanks
> 
> Markus
> 
> 
> 
> -----------------------------------------------------------------------
> -----
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
> 
> 
> -----------------------------------------------------------------------
> -------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart
> your
> developing skills, take BlackBerry mobile applications to market and
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users


----------------------------------------------------------------------------
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to