Inno Setup - How to localize a string in Pascal Script?

落花浮王杯 提交于 2019-11-27 06:30:02

问题


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;

回答1:


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

[CustomMessages]
NextButtonCaption=Next

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

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


来源:https://stackoverflow.com/questions/41185761/inno-setup-how-to-localize-a-string-in-pascal-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!