Inno Setup-如何在Pascal脚本中本地化字符串? [英] Inno Setup - How to localize a string in Pascal Script?

查看:93
本文介绍了Inno Setup-如何在Pascal脚本中本地化字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何用语言更改'Next'?有可能吗?

How to change the 'Next' with a language? It is possible?

procedure CurPageChanged(CurPageID: Integer);
begin
  if CurPageID = iscustompage1.id then
    starttimer(WizardForm.Handle,WizardForm.NEXTBUTTON.Handle,'Next',5)
  else
  if (CurPageID = wpWelcome) or (CurPageID = wpSelectDir) then
  begin
    stoptimer();
  end;
end;

推荐答案

要本地化Pascal脚本的字符串,请定义自定义消息:

To localize a string for Pascal Script, define a custom message in the language file:

[CustomMessages]
NextButtonCaption=Next

然后使用 CustomMessage函数函数使用此自定义消息在您的代码中:

And then use this custom message using the CustomMessage function function in your code:

starttimer(
  WizardForm.Handle, WizardForm.NEXTBUTTON.Handle, 
  CustomMessage('NextButtonCaption'), 5)

这篇关于Inno Setup-如何在Pascal脚本中本地化字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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