Inno Setup - Change the MessageBox language

匿名 (未验证) 提交于 2019-12-03 00:56:02

问题:

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; 

回答1:

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; 


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