Reputation: 1123
I have 2 projects:
InstallerUILibrary.wixlib
- contains a custom WIX dialog and UI fragment so i can reuse it and the localizable text the dialog uses.SomeInstaller.wixproj
- an installer project which references InstallerUILibrary.wixlib
which uses the UI in it's installer product.I have localised the text in InstallerUILibrary.wixlib
with entries like this:
<Control Id="DiskCost" Text="!(loc.InstallDirDiskCostDlgDiskCost)">
And included en-us.wxl
in InstallerUILibrary.wixlib
which looks something like this:
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="InstallDirDiskCostDlgDiskCost">Disk Cost...</String>
</WixLocalization>
SomeInstaller
however fails to see the wxl
file and therefore does not build as the localisable text is broken.
Is this expected? Have a I made some boo boo in referencing my project files? Is there some switch somewhere which will make it all work?
Do i have to include en-us.wxl
in each of the consuming project?
Upvotes: 0
Views: 621
Reputation: 1123
Empirically I have discovered that you need to add at least one localisation file to your installer project. This doesn't need to include any strings, just the WixLocalization
element.
If you don't have any .wxl
files then the "Cultures to build" text box will be read only. But once you add one this appears to prompt Votive to get it's act together and apply some localisation you asked for.
Then what you can do is "suggest" that it build an invariant culture version of the installer falling back on your chosen language. by adding this
neutral,en-us;
To the Cultures to build text box in the project properties which should now be editable.
So in summary my solutions loom like this:
InstallerUILibrary.wixproj - wixlib
SomeInstaller.wixproj - Installer - Cultures to build set to neutral,en-US;
Culture = ""
(empty string)If anyone has a neater solution that would be wonderful.
Some reading I found only mildly useful:
Upvotes: 2