6

How to know what language user have selected to install setup in innosetup ? Im using innosetup 5.3 to package my application, its an multilingual application and so it would be useful if i knew what language user has selected to install the package. Thanks in advance.

menjaraz
  • 7,551
  • 4
  • 41
  • 81
Naresh
  • 305
  • 2
  • 6
  • 14

2 Answers2

10

1.5.3? do you mean the current version (5.3)? if so if you have:

[Languages]
Name: "en"; MessagesFile: "compiler:english.isl"
...

you can return the language "en" via the {language} constant.

Alex K.
  • 171,639
  • 30
  • 264
  • 288
  • you can return the language "en" via the {language} constant. Where and how do i get this {language} constant , do u have any sample for this. Thanks – Naresh Apr 29 '10 at 11:14
  • You can use it in inno directives like: `Filename: "C:\XXX\{Language}\some.file` It depends on what you want to do with the "en" string – Alex K. Apr 29 '10 at 11:39
6

Try this method to determine what language user selected:

[Code]
var
  ResultLan: String;

procedure MyConst();    
begin
  ResultLan := ExpandConstant('{language}');    
  MsgBox(ResultLan, mbInformation, MB_OK);        
end;

Pina

TLama
  • 75,147
  • 17
  • 214
  • 392
Pina
  • 61
  • 1
  • 1