本文介绍了如何在Inno Setup中翻译MsgBox中包含的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的inno设置脚本中包含一个[code]部分,该部分在安装过程中为用户显示一些信息.我希望能够以用户在安装过程中选择的相同语言翻译这些内容.他们目前使用的是英文文本,例如想将其翻译成俄语,等等.我知道我必须在Language.isl文件中做一些事情.以下是此类文字的示例.

I have got a [code] section contained within my inno setup script which displays some information for the user during install. I would like to be able to translate these in the same language the user selected during install. They texts are currently in English and for example want to translate it in Russian, etc. I know I have to do something in the Language.isl file. Below is a example of such text.

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

推荐答案

[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;

这篇关于如何在Inno Setup中翻译MsgBox中包含的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

05-28 04:19
查看更多