javainstall4j

Getting the installer language


I'm trying to obtain the selected installer language, as i understand it this variable should contain the selected 2 character language code:

context.getCompilerVariable("sys.languageId")

My default language is 'de' and during the install i select 'en' under the install4j language selection screen, despite this the 'sys.languageId' value is always 'de'.

Is there another variable that can be used?


Solution

  • Compiler variables are fixed at compile time. The compiler variable sys.languageID contains the ISO 639 code of the principal language of the project. The code for the language that is actually used by the installer is contained in an installer variable of the same name. You can access the value of that variable in text fields with the syntax

    ${installer:sys.languageId}