Nico Z
Nico Z

Reputation: 1037

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

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;

Upvotes: 3

Views: 740

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202642

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)

Upvotes: 4

Related Questions