Question

in WiX .wxs file, we just can do things without 'if' logic. is there any logic in WiX as:

if (OSLanguage==en-US)
{
    copy file1 to dir1
}
else if(OSLanguage==zh-CN)
{
    copy file2 to dir2
}
else if(OSLanguage==de-DE)
{
    copy file3 to dir3
}
else
{
    copy file4 to dir4
}

No correct solution

OTHER TIPS

Put file1 in a component being installed to dir1 and give it a condition of SystemLanguageID=1033.

Similarly with the other files in their own components.

http://msdn.microsoft.com/en-us/library/aa372056(v=vs.85).aspx

In a per user install it could make more sense to use UserLanguageID in case the user is using one language and the OS is another.

http://msdn.microsoft.com/en-us/library/aa372384(v=vs.85).aspx

i got a solution, as following. we can use Condition when copying files.

<DirectoryRef Id="INSTALLLOCATION">
  <Component Id="resources.dll.zh_HANS" Guid="B7F590B2-1F3F-441E-B16F-EEF7AE240502">
    <Condition>UserLanguageID=2052</Condition>
    <File Id="resources.dll.zh_HANS" Source="E:\share\tmp\res\res\out\zh-Hans\res.dll" KeyPath="yes"/>
  </Component>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top