This question is related to a previous question on this forum:

In addition to the method described in the answer there, that the default strings may be provided in a language file, the text on a button can be changed programmatically:

<setInstallerVariable>
  <name>ui.button(next).text</name>
  <value>Sample next text</value>
</setInstallerVariable>

Therefore the variable

ui.button(next).text

is associated with the entry

Installer.Button.Next=Sample &next text

in the language file (such as <en.lng>). Are there similar associations for other language strings?

In particular, is there a variable corresponding to:

Installer.Installation.Question.Abort=Do you want to abort the installation process?

(The reason for this question is that I would like to change the text only for upgrade installers and only beyond the clicking of the final "next" button.)

Thanks,
Rob.

asked 05 Mar '12, 07:34

Rhubbarb's gravatar image

Rhubbarb
166610
accept rate: 0%

By the way, I couldn't find the answer to this in the User Guide, the Reference, nor on this forum.

I also tried to glean the information using the debugger during an install, but couldn't find anything under any 'ui' structure.

(05 Mar '12, 07:38) Rhubbarb

It is not possible to change messages at runtime, however, your messages may contain references to other variables that can be set at runtime. For example:

Installer.Installation.Question.Abort=${QuestionAbortMessage}

You can then set the value for the variable based on some criteria. Such as:

<if>
  <actionList>
    <setInstallerVariable>
      <name>QuestionAbortMessage</name>
      <value>${msg(Installer.Installation.Question.Abort.Upgrade)}</value>
    </setInstallerVariable>
  </actionList>
  <conditionRuleList>
    <isTrue>
      <value>${isupgrade}</value>
    </isTrue>
  </conditionRuleList>
  <elseActionList>
    <setInstallerVariable>
      <name>QuestionAbortMessage</name>
      <value>${msg(Installer.Installation.Question.Abort.Install)}</value>
    </setInstallerVariable>
  </elseActionList>
</if>

The example above uses ${msg(...)} variables so the error message can still be made language-specific. For example you can add the following messages to your English custom language file:

Installer.Installation.Question.Abort.Install=Do you want to abort the installation process?
Installer.Installation.Question.Abort.Upgrade=Do you want to abort the upgrade process?

This will allow showing a different message depending on whether the installation is a fresh install or an upgrade.

link

answered 05 Mar '12, 08:09

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

Thanks Wojciech,

that works fine. I have used this method in conjunction with functions, which I call from initializationActionList and preInstallationActionList to set the before-the-installation-is-underway text, and from readyToInstallActionList to set the installation-is-now-underway text.

Rob.

(05 Mar '12, 14:34) Rhubbarb

We are trying to use this technique to modify text on a License page but it isn't working. We are using two licenseParameter pages, one for a regular EULA, and another to display information we want the user to read before installing. On the Information page, we want to change the question at the bottom to something like "Do you understand this information?", with the radio buttons changed to "Yes" and "No".

I created a custom-en.lng file:

Installer.License.IAccept=${AcceptYes}
Installer.License.IDoNotAccept=${AcceptNo}
Installer.License.DoYouAccept=${AcceptQuestion}
Installer.License.InfoIAccept=&Yes
Installer.License.InfoIDoNotAccept=&No
Installer.License.InfoDoYouAccept=Do you understand this information?
Installer.License.LicenseIAccept=I &accept the agreement
Installer.License.LicenseIDoNotAccept=I &do not accept the agreement
Installer.License.LicenseDoYouAccept=Do you accept this license?

The XML for the Information page:

    <licenseParameter>
        <name>infoPage</name>
        <title>Important Information</title>
        <description>Please read this before installing ${product_fullname}.</description>
        <insertAfter>welcome</insertAfter>
        <file>../files/doc/readme.txt</file>
        <wrapText>1</wrapText>
        <preShowPageActionList>
            <setInstallerVariable>
                <name>AcceptQuestion</name>
                <value>${msg(Installer.License.InfoDoYouAccept)}</value>
            </setInstallerVariable>
            <setInstallerVariable>
                <name>AcceptYes</name>
                <value>${msg(Installer.License.InfoIAccept)}</value>
            </setInstallerVariable>
            <setInstallerVariable>
                <name>AcceptNo</name>
                <value>${msg(Installer.License.InfoIDoNotAccept)}</value>
            </setInstallerVariable>
        </preShowPageActionList>
    </licenseParameter>

When it runs, the page contains the literal "${AcceptQuestion}", "${AcceptYes}", "${AcceptNo}" strings, not the replaced variable values. We put the customLanguageFileList at the project level, should it be somewhere else?

Jim Shawver
BCC Software

link

answered 27 Apr '16, 16:04

jshawver's gravatar image

jshawver
1689
accept rate: 0%

Here is a screenshot, the text at the bottom is not getting replaced with the variable values.

alt text

link

answered 27 Apr '16, 16:19

jshawver's gravatar image

jshawver
1689
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×31
×27
×21
×19
×12
×5

Asked: 05 Mar '12, 07:34

Seen: 3,984 times

Last updated: 27 Apr '16, 16:19