Usually WXL files are known only to light.exe, not to candle.exe, so culture can only be known long after the preprocessor is done.
I didn't test this, but if I recall correctly, you can do something like this: <WixLocalization Culture="FRCA"> <String Id="SourceFoo">C:\French\foo.txt</String> <!-- rest of your strings --> </WixLocalization> Etc. Then: <File Id="foo" Name="foo.txt" Source="!(loc.SourceFoo)" /> -----Original Message----- From: D8xter [mailto:d8x...@hotmail.com] Sent: Tuesday, July 27, 2010 12:46 PM To: Wix-Users Subject: [WiX-users] Determine build language at compile time. I don't appear to be able to utilize localization strings in order to define variables or conditional statements. Is there another way to determine, at compile time, what language I am building? I would like to remove the additional overhead associated with changing environmental or system variables between translated builds but am unable to find another way. What I think I would like to be able to do is something like this: <?define Sku = !(loc.CultureID) ?> OR <?if !(loc.CultureID) = FRCA?> <File Id="foo" Name="foo.txt" Source="C:\French\foo.txt" /> <?elseif !(loc.CultureID) = ESLA?> <File Id="foo" Name="foo.txt" Source="C:\Latam\foo.txt" /> <?else?> <File Id="foo" Name="foo.txt" Source="C:\US\foo.txt" /> <?endif?> (I understand in this simple IF statement there are other ways to get the source path.it is just an example.) I would like to utilize a single *.wxs with multiple *.wxl files (one for each translation). Any help is much appreciated. ---------------------------------------------------------------------------- -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users