2014-05-07 78 views
2

我有一个[code]部分包含在我的inno安装脚本中,它在安装过程中为用户显示一些信息。我希望能够使用用户在安装过程中选择的同一种语言翻译这些语言。他们的文本目前是英文的,例如想用俄文翻译它,等等。我知道我必须在Language.isl文件中做些什么。以下是这种文字的一个例子。如何翻译Inno Setup中的MsgBox中包含的文本?

if MsgBox('Previous program found. It is recommendeded to uninstall it and install a fresh program. Please note that your data will not be deleted during the uninstallation. Do you want to continue?', mbConfirmation, MB_YESNO) = IDYES then 
     begin etc 
+0

用['定制messages'](http://www.jrsoftware.org/ishelp/index.php?topic=custommessagessection)。 – TLama

+0

您应该创建'[CustomMessages]',然后像'MsgBox(ExpandConstant('{cm:MyCustomMessage}'),mbInformation,MB_OK);' – RobeN

+0

[Inno Setup - 更改MessageBox语言] //stackoverflow.com/questions/12989941/inno-setup-change-the-messagebox-language) – TLama

回答

2
[Languages] 
Name: "english"; MessagesFile: "compiler:Default.isl" 
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" 
Name: "german"; MessagesFile: "compiler:Languages\German.isl" 

[CustomMessages] 
CustomMessage=Undefined //just in case (should be equal to English) 
english.CustomMessage=English Selected 
german.CustomMessage=German Selected 
polish.CustomMessage=Polish Selected 

[Code] 
function InitializeSetup: Boolean; 
begin 
    Result := True; 
    MsgBox(ExpandConstant('{cm:CustomMessage}'), mbInformation, MB_OK); 
end; 
相关问题