[英]Inno Setup Detect selected language in [Code]
I want to download file with IDP plugin, but I need to choose the file in function of language.我想用IDP插件下载文件,但我需要选择语言功能的文件。 Example: installing in English and Spanish and the files are
myfile_x86_eng.exe
and myfile_x86_spa.exe
.示例:以英语和西班牙语安装,文件为
myfile_x86_eng.exe
和myfile_x86_spa.exe
。 I don't know nothing about Pascal and I've searched the internet and Stack Overflow without finding results.我对 Pascal 一无所知,我在互联网和 Stack Overflow 上搜索过,但没有找到结果。
I need something like this:我需要这样的东西:
#include ". \ Idp.iss"
[Languages]
Name: "English"; MessagesFile: "compiler: Languages \ English.isl";
Name: "Spanish"; MessagesFile: "compiler: Languages \ Spanish.isl";
[Code]
Procedure InitializeWizard (): string;
Var
Language: string;
Begin
Language: = ExpandConstant ('{param: LANG}');
If Language = 'English' then
Begin
IdpAddFile ('https://myweb.com/myfile_x86_eng.exe', ExpandConstant ('{tmp} \ myfile_x86_eng.exe'));
End
Else
If Language = 'Spanish' then
Begin
IdpAddFile ('https://myweb.com/myfile_x86_esp.exe', ExpandConstant ('{tmp} \ myfile_x86_spa.exe'));
End;
End;
Other way can be make a language variable like this myfile_x86_ {lang} .exe
or something similar其他方法可以制作像这样的语言变量
myfile_x86_ {lang} .exe
或类似的东西
Use the ActiveLanguage
function :使用
ActiveLanguage
函数:
if ActiveLanguage = 'English' then
begin
IdpAddFile('https://www.example.com/myfile_x86_eng.exe',
ExpandConstant('{tmp}\myfile_x86_eng.exe'));
end
else
if ActiveLanguage = 'Spanish' then
begin
IdpAddFile('https://www.example.com/myfile_x86_esp.exe',
ExpandConstant('{tmp}\myfile_x86_spa.exe'));
end;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.