Inno Setup:如何根据代码更改语言文件 [英] Inno Setup : How to change language file depending on code

查看:353
本文介绍了Inno Setup:如何根据代码更改语言文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用自己的语言文件(.isl),而不使用Inno Setup的默认语言文件.它允许我自定义一些消息.但是现在,我希望每个语言文件都有两个版本,第一次安装时一个,更新时一个,但是,是否可以从代码中选择一个文件?如果是,该怎么办?

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.

谢谢

推荐答案

将替代文本添加到[Custom Messages]部分:
https://jrsoftware.org/ishelp/index.php?topic=custommessagessection

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

然后在Pascal脚本中进行升级时,使用通过CustomMessage('MyAlternativeUpgradeString')
加载的替代翻译来更新相应的GUI元素. https://jrsoftware.org/ishelp/index.php?topic=isxfunc_custommessage

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

这篇关于Inno Setup:如何根据代码更改语言文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆