Alain
Alain

Reputation: 410

Inno Setup : How to change language file depending on code

I use my own languages files (.isl) instead of using the default languages files of Inno Setup. It permits me to customize some messages. But now, I would like to have two versions of each language files, one in case of first installation and one in case of update, but, is it possible to choose a file from the code? If yes, how to do it?

Maybe there is some better way for changing the messages than change the languages files depending on the type of installation, if yes, I would like to know what to do.

Thanks

Upvotes: 3

Views: 1483

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202118

Add the alternative texts to [Custom Messages] section:
https://jrsoftware.org/ishelp/index.php?topic=custommessagessection

Then in Pascal script, when upgrading, update the respective GUI element with the alternative translation loaded using CustomMessage('MyAlternativeUpgradeString')
https://jrsoftware.org/ishelp/index.php?topic=isxfunc_custommessage

Upvotes: 4

Related Questions