I assume you are using WixStdBA and not your own BA? If so, looking at the Wix4 
source the lang command line parsing is done from within WixStdBA and not the 
engine.  Sadly, it's not creating a variable (thought it would seem to be a 
valid feature request).

Inside of WixStandardBootstrapperApplication.cpp, in method ProcessCommandLine, 
simply adding 

                        hr = m_pEngine->SetVariableString("lang", 
*psczLanguage);
                        BalExitOnFailure(hr, "Failed to set lang variable.");

After the parsing of the lang parameter "should" do it.

It would be something I could see being logged as a feature on 
http://wixtoolset.org/issues/. In the meantime, you could always do your own 
compile.

-----Original Message-----
From: runel_kr...@juno.com [mailto:runel_kr...@juno.com] 
Sent: Tuesday, February 17, 2015 12:30 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] burn bootstrapper access -lang as a property or variab 
le

I'm afraid the provided link hasn't helped me solve my problem. I am trying to 
get the bootstrapper and the MSI to both be translated into the same language. 
When the user enters the -lang 1046 as a command line parameter for the 
bootstrapper, the bootstrapper is correctly switching to the localized 
1046\thm.wxl and 1046\license.rtf. But I can't seem to figure out how to get 
access to the selected language so that I can perform the correct transform on 
the MSI. It would be nice if I could just access the -lang value directly, but 
I was not able to find a way to do this.  (I have tested both the bootstrapper 
localization and the MSI transforms. Both localizations work when called 
explicitly so I know it is just a matter of finding the right way to select the 
transform.) After failing to get access to the -lang argument, I tried was to 
create all my localized strings in the bootstrapper and pass them into the MSI 
as properties.<MsiPackage Id="msi_English" SourceFile="../Installer/bin/$
 (var.Configuration)/en-us/app.msi" DisplayInternalUI="yes"/>   <MsiProperty 
Name="String1" Value="!(loc.String1)"/> </MsiPackage> This failed because it 
appears the !(loc.String1) in the MsiProperty doesn't use the localized string, 
it uses the default string. I also tried using a localized string as the 
install condition, but had the same problem. The default string is used, not 
the localized one. <MsiPackage Id="msi_English" 
SourceFile="../Installer/bin/$(var.Configuration)/en-us/app.msi" 
DisplayInternalUI="yes" InstallCondition="(NOT !(loc.Language) = 
&quot;1046&quot;)"/> <MsiPackage Id="msi_Portuguese" 
SourceFile="../Installer/bin/$(var.Configuration)/en-us/app.msi" 
DisplayInternalUI="yes" InstallCondition="(!(loc.Language) = 
&quot;1046&quot;)">   <Payload Id="pt_mst" 
SourceFile="../Installer/bin/$(var.Configuration)/en-us/pt-br.mst"/>   
<MsiProperty Name="TRANSFORMS" Value="pt-br.mst"/> </MsiPackage> Thanks again.
____________________________________________________________
Protect what matters
Floods can happen anywhere. Learn your risk and find an agent today.
http://thirdpartyoffers.juno.com/TGL3131/54e388bd7c3438bd4883st03vuc
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! 
Instantly Supercharge Your Business Reports and Dashboards with Interactivity, 
Sharing, Native Excel Exports, App Integration & more Get technology previously 
reserved for billion-dollar corporations, FREE 
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to