Conditional language-based installation using Inno Setup

I am trying to perform a conditional installation based on the selected language in Inno Setup.

those. if the selected language is English, then install the en.txt file, if the language is Italian, then install the it.txt file, etc.

Can this be done? I saw that there is a constant {language}, but I don’t understand how to use it for conditional installation.

+3
source share
2 answers

Which file is installed based on the language selection is always conditional by simply adding the Languages ​​parameter to the [Files] entry.

General parameters from the Inno Setup directory:


, , . , (: ).

Languages ​​ , , .

, . . .

  :
  : en nl

, , , , ( ), [Files] :

[Files]
Source: "MyProg-en.chm"; DestDir: "{app}"; Languages: en
Source: "MyProg-es.chm"; DestDir: "{app}"; Languages: es
Source: "x.exe"; DestDir: "{app}"; Languages: en es

Languages.iss script, -.

+9

, .

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "ger"; MessagesFile: "compiler:Languages\German.isl"
Name: "fr"; MessagesFile: "compiler:Languages\French.isl"

[Registry]
Root: HKCR; Subkey: ".tes"; ValueType: string; ValueName: ""; ValueData: "Testing..."; Languages: fr

intstalls , . , .

+2

Source: https://habr.com/ru/post/1785306/


All Articles