[wix-users] Problem with properties in localized strings
Lewis Henderson
henderso at opentext.com
Fri Mar 25 07:57:32 PDT 2016
Hi John,
Since it took the !(loc.MyShortcutName) value properly, I assumed it did take formatted strings. Can a non-formatted string value still take a !(loc.*) value?
After looking more carefully at the Shortcut element, the Name is a LongFileNameType, which explicitly allows the !(loc.*) specification, but I guess doesn't do string formatting. Bummer.
Anyway, thanks for the response. That led me to the disheartening conclusion.
Lewis Henderson
OpenText, Inc.
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of John Cooper
Sent: Friday, March 25, 2016 10:31 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Problem with properties in localized strings
Does the Shortcut Description attribute format? Looking at the documentation, it does not appear it does. Without formatting, the [property] will not be replaced with the value.
--
John Merryweather Cooper
Senior Software Engineer | Integration Development Group | Enterprise Notification Service Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Ext: 431050 |JoCooper at jackhenry.com
-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Lewis Henderson
Sent: Friday, March 25, 2016 9:03 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] Problem with properties in localized strings
The e-mail below is from an external source. Please do not open attachments or click links from an unknown or suspicious origin.
Hi Folks,
I've run into a problem with localized strings. I've found that, in general, you can use a property in a localized string, such as:
<Property Id="ProductVersion" Value="1.0" />
<String Id="MyServiceDesc" Overridable="yes">MyService for MyProduct [ProductVersion]</String>
<ServiceInstall Name="MyService" ... Description="!(loc.MyServiceDesc)" ... />
In this case everything comes out as you'd expect. Of course, the <String /> element is in a .wxl file.
However, if I use this same property in a shortcut name, the property doesn't translate:
<String Id="MyShortcutName" Overridable="yes">MyProduct version [ProductVersion]</String>
<Shortcut Id="MyShortcut" Name="!(loc.MyShortcutName)" ...>
The shortcut in the ProgramMenu comes up as: "MyProduct version [ProductVersion]" instead of "MyProduct version 1.0" as you'd expect. Why does this same property use fail for the shortcut name?
Can anyone help out here? It's not a show stopper, but it would make things much simpler if this worked. Thanks for any help you can provide.
Lewis Henderson
OpenText, inc.
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information.
Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies.
____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users
mailing list