problem changing dialog text dynamically - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

covarubias
Posts: 6
Joined: Fri Feb 01, 2008 3:38 pm
Location: Germany

problem changing dialog text dynamically

Hello,

my installation has the following parameters:
media -> bootstrapper->"display language selection dialog"
translations -> i chose several languages here and "multilingual package"
dialogs -> second folder dialog

in my installation i want the user to choose another folder for user data, after selecting one for the program data. for that i included a second folder dialog in the installation-process.
in this dialog i want to change the following Properties to fit my needs: Title, Description, FolderLabel. For example i write "Installation of MyProgram" instead of the default value "New Dialog".

In order to support more than one language i put these values not to constant strings but to special Properties ("DataDialogA",...) in the "Install Parameters" that automatically (with a custom action in InstallUISequence->"Begin") change according to the language the user has chosen in the beginning of the installation process.
In the Install Parameters i have also put static Properties ("DataDialog_<language>_A", ...) for every supported language. They contain the right translation for the three dialog texts. The default properties for the dialog should be exchanged according to the chosen language.
here is a sample of my vbscript, that puts the dialog-properties:

Code: Select all

Dim language, oShell

Set oShell = CreateObject("WScript.Shell")
language = Session.Property("ProductLanguage") 

if language = 1031 then 'Deutsch
	Session.Property("DATADialogA")=Session.Property("DataDialog_De_A")
	Session.Property("DATADialogB")=Session.Property("DataDialog_De_B")
	Session.Property("DATADialogC")=Session.Property("DataDialog_De_C")
end if
if language = 1033 then 'Englisch
	Session.Property("DATADialogA")=Session.Property("DataDialog_Eng_A")
	Session.Property("DATADialogB")=Session.Property("DataDialog_Eng_B")
	Session.Property("DATADialogC")=Session.Property("DataDialog_Eng_C")
end if
my problem is, that the text in the properties doesn't change according to the selected language. the only time when the right texts are displayed is, when i choose the english language. in all other languages only the default advanced installer texts like "New Dialog" for the property "Title" are shown.

is the time InstallUISequence->"Begin" already too late for the custom action to change the dialog-properties?
could there be another reason why i am having these problems?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Hi,

Please try using public properties (all uppercase letters) instead of private properties. You can read more about Windows Installer properties here:
http://www.advancedinstaller.com/user-g ... rties.html

Note that what you need can also be done by using the per-element localization feature in Advanced Installer. Basically you will create a custom dictionary with Advanced Installer and edit it to give specific values to a property depending on the language in which the installation runs.

You can read more about this here:
http://www.advancedinstaller.com/user-g ... uages.html
http://www.advancedinstaller.com/user-g ... guage.html
http://www.advancedinstaller.com/user-g ... ialog.html
http://www.advancedinstaller.com/user-g ... ialog.html
http://www.advancedinstaller.com/forums ... php?t=5023
http://www.advancedinstaller.com/forums ... php?t=4349

Let me know if you encounter any problems.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”