[Setup]
AppName=My Application
AppVersion=1.5
DefaultDirName={pf}\My Application
InfoBeforeFile=ReadMeRu.rtf
[Files]
Source: ReadMeRu.rtf; DestDir: {tmp}
Source: ReadMeEn.rtf; DestDir: {tmp}
[Code]
var
LanguageChangeButton: TNewButton;
S: AnsiString;
procedure LangClick(Sender : TObject);
begin
case TButton(Sender).Tag of
0: begin
TButton(Sender).Tag := 1;
TButton(Sender).Caption := 'Rus';
///и т.д. на англ
LoadStringFromFile(ExpandConstant('{tmp}\ReadMeEn.rtf'), S);
WizardForm.InfoBeforeMemo.RTFText := S;
end;
1: begin
TButton(Sender).Tag := 0;
TButton(Sender).Caption := 'Eng';
///и т.д. на рус
LoadStringFromFile(ExpandConstant('{tmp}\ReadMeRu.rtf'), S);
WizardForm.InfoBeforeMemo.RTFText := S;
end;
end;
end;
procedure InitializeWizard();
begin
ExtractTemporaryFile('ReadMeRu.rtf');
ExtractTemporaryFile('ReadMeEn.rtf');
LanguageChangeButton := TNewButton.Create(WizardForm);
with LanguageChangeButton do
begin
Parent := WizardForm;
SetBounds(ScaleX(8),ScaleY(325),ScaleX(35),ScaleY(23));
Caption := 'Eng';
OnClick := @LangClick;
end;
end;