2014-05-07 116 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; 
相關問題