4

i have this problem... i did a personal messagebox... i put in a very funny way english and spanish... but i want my installer to display only one language... like... when i choose in the menu selector spanish... in that messagebox shows spanish... if a choose italian in the menu selector... let that messagebox show itallian.

[code]
function NextButtonClick1(PageId: Integer): Boolean;
begin
    Result := True;
    if (PageId = wpSelectDir) and not FileExists(ExpandConstant('{app}\xxx.exe')) then begin
        MsgBox('"Thi App" does not seem to be installed in that folder.  Please select the correct folder. [Selecciona la Carpeta de Instalación de la Aplicación]', mbError, MB_OK);
        Result := False;
        exit;
    end;
end;
Dielo
  • 603
  • 2
  • 12
  • 25

1 Answers1

7

Use the [CustomMessages] section and prefix the message names there with the internal name of the language like shown in the following script:

[Setup]
AppName=My Program
AppVersion=1.5
DefaultDirName={pf}\My Program
OutputDir=userdocs:Inno Setup Examples Output

[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: es; MessagesFile: "compiler:Languages\Spanish.isl"

[CustomMessages]
en.AppCheckError=Select the application folder!
es.AppCheckError=Selecciona la Carpeta de Instalación de la Aplicación!

[Code]
procedure InitializeWizard;
begin
  MsgBox(ExpandConstant('{cm:AppCheckError}'), mbInformation, MB_OK);
end;
TLama
  • 75,147
  • 17
  • 214
  • 392
  • Thank a lot men... you are good in this... i fell like giving you credits in my installer XD – Dielo Oct 20 '12 at 15:57
  • 2
    Note that the buttons in the messagebox will always be in the user's UI language, regardless of which language they selected for the install. (It's just how Windows works.) – Miral Oct 21 '12 at 07:02
  • Yeah men... am learning... i didnt touch this codes stuff since long time ago... Thanks a lot – Dielo Oct 21 '12 at 15:52