Thanks Blair. I am using the similar technique as you described.
-----Original Message-----
From: Blair [mailto:[email protected]]
Sent: Wednesday, July 08, 2009 11:03 AM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] How to dynamically get current locale that my msi is
built in?
I tested something like this and it seemed to work:
Add a value (<String Id='Culture'>en-us</String>) in your .wxl files and set
the value to the appropriate value (es-es) in your translated .wxl file.
Then do something like this:
<Directory Name="!(loc.Culture)" Id="RESOURCE"/>
...
<Component Id='resComponent' Guid='*' Location='local' DiskId='1'
Win64='$(var.Win64AttributeValue)' Directory='RESOURCE'>
<File Id='RES'
Vital='yes'
KeyPath='yes'
Name='resources.dll'
Source='$(var.Binaries_PATH)\!(loc.Culture)\resources.dll'
/>
</Component>
You will need to also use a !(loc.LCID) or similar string to set the
Product/@Language value from your wxl files as well.
Note that I usually never use the Windows Installer UI (and the WixUI, by
extension), so I don't know if those values are already supplied for you.
-----Original Message-----
From: Lian Jiang [mailto:[email protected]]
Sent: Sunday, July 05, 2009 8:45 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] How to dynamically get current locale that my msi
is built in?
Thanks for any suggestion.
-----Original Message-----
From: Lian Jiang
Sent: Friday, July 03, 2009 7:50 AM
To: General discussion for Windows Installer XML toolset.
Cc: Lian Jiang
Subject: How to dynamically get current locale that my msi is built in?
Hi,
I have a wixproj which specifies "<Cultures>en-us;es-es</Cultures>". As you
know, compiling this wixproj will create two MSIs located in en-us folder
and es-es folder respectively.
My installer installs a UI product and need to place the corresponding
resource file to the installation folder. For example, the en-us version MSI
should put the en-us resource of the UI product to the installation folder.
Right now, I am hard code the locale names and put all locales' resources to
the installation folder like:
<DirectoryRef Id="RESOURCE_en-us">
<Component Id='enusComponent'
Guid='7251f24a-ebf5-4833-9dfb-275ee9b0f9e7' Location='local' DiskId='1'
Win64='$(var.Win64AttributeValue)'>
<File Id='RES_en-us'
Vital='yes'
KeyPath='yes'
Name='resources.dll'
Source='$(var.Binaries_PATH)\en-us\resources.dll' />
</Component>
</DirectoryRef>
<DirectoryRef Id="RESOURCE_es-es">
<Component Id='enusComponent'
Guid='7251f24a-4424-4833-adaa-27424b0f9e7' Location='local' DiskId='1'
Win64='$(var.Win64AttributeValue)'>
<File Id='RES_es-es'
Vital='yes'
KeyPath='yes'
Name='resources.dll'
Source='$(var.Binaries_PATH)\es-es\resources.dll' />
</Component>
</DirectoryRef>
This is obvious a bad solution since it packs all locales resources for any
locale's MSI. I would like pack only the corresponding locale resource for
one MSI. But how can I dynamically get the current locale that the MSI is
built? Is there any global variable exposing locale information?
Appreciate your help!
Thanks
Lian
----------------------------------------------------------------------------
--
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users
------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge
This is your chance to win up to $100,000 in prizes! For a limited time,
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users