jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

How to set the culture of the installed program based on the language selection of the installer

Hello,

I have a config file which has a CultureInfo parameter which sets the culture of the program. For example "en-US" for american english or "es-ES" for spanish.

I have tried setting this value based on the language selection the user does on the installer. I have seen that the language changes the property AI_BOOTSTRAPPERLANG. I would need to react to the change on this property to set the value of a custom property I have created called APP_CULTURE with the corresponding value, for example:
1033 -> en-US
1034 -> es-ES

I have tried to set the value of my property in the language page as follows but it is not working:
lang.png
lang.png (17.83 KiB) Viewed 2417 times
Could you help me to set the value of my property based on the value of the AI_BOOTSTRAPPERLANG property?

Thanks in advance
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: How to set the culture of the installed program based on the language selection of the installer

Hello,

In order to achieve what you want, you can proceed as it follows:

- Go to "Dialogs" page, select "WelcomeDlg" and click on the "Next" button.

- Now under "Published Events" tab, press the "New..." button to create an event as it follows:

Code: Select all

Set installer property
Property: APP_CULTURE
Argument: en_US
Condition: ProductLanguage = 1033
Repeat the above steps for the other languages. The [APP_CULTURE] property should correctly be defined now.

Hope this helps.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jminsa
Posts: 25
Joined: Mon Oct 29, 2018 5:45 pm

Re: How to set the culture of the installed program based on the language selection of the installer

Thanks,

I was able to go back to this today, in my project i don't seem to find a WelcomeDlg other than the pre-requisites one.
Anyway, I did what you said on the Next button of the language page and it worked.

best regards
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: How to set the culture of the installed program based on the language selection of the installer

Hello,

I am glad you got this working.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”