更改MessageBox语言

更改MessageBox语言

本文介绍了Inno Setup-更改MessageBox语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这个问题...我做了一个个人消息框...我用一种非常有趣的方式用英语和西班牙语写了一下...但是我希望我的安装程序仅显示一种语言...就像...在菜单选择器中选择西班牙语" ...在该消息框中显示西班牙语...如果在菜单选择器中选择意大利语",则使该消息框显示意大利语.

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;

推荐答案

使用 [CustomMessages] 部分,并在其中在 message 名称前面加上语言的内部名称,如以下脚本所示:

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;

这篇关于Inno Setup-更改MessageBox语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-22 22:38