bcorcoran
Posts: 1
Joined: Mon Nov 07, 2022 9:16 pm

Dictionary Strings in custom scripts

Mon Nov 07, 2022 9:24 pm

Hi,

I'd like to retrieve a string from my translation dictionary, and use it in a custom action script (VBS). The reason is to avoid having to translate a string twice, and the string is already extracted. Can this be done? Asking for a session property does not work.

Thank you,

Brian Corcoran
JMP Development
SAS

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Dictionary Strings in custom scripts

Wed Nov 09, 2022 11:03 am

Hello Brian and welcome to our forums,

I'm afraid I do not quite understand your scenario.

If possible, could you please give me some more details (perhaps use some screenshots) so I can better understand this?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

briancorcoran
Posts: 19
Joined: Thu Mar 16, 2017 4:21 pm

Re: Dictionary Strings in custom scripts

Tue Nov 15, 2022 9:11 pm

The project contains dictionaries of translated strings (picture attached) that are used in installer dialogs. I have a custom action that invokes a VBScript inline script. I would like it to be able to retrieve a string from one of these dictionaries, say using Session.Property, to use the string in an error message.

-Brian
AIDictionary.PNG
AIDictionary.PNG (22.62KiB)Viewed 2414 times

Catalin
Posts: 6542
Joined: Wed Jun 13, 2018 7:49 am

Re: Dictionary Strings in custom scripts

Thu Nov 17, 2022 4:55 pm

Hello Brian,

I'm afraid that might not be possible.

What you could do, however, is having multiple error messages custom actions (for each of your language) and then condition each accordingly to the language using the ProductLanguage property.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”