General Settings - Languages


  On this tab of the General Settings step you define the principal language as well as additional languages supported by your installers.
  The following options are available:
  • Principal language
    The principal language is the language that your installer defaults to if no other supported languages match the locale at runtime.
  • Custom localization file
    A custom localization file is text file with key-message pairs in the format of
    • a Java properties file
      a Java properties file has ISO 8859-1 encoding, all other characters must be represented as Unicode escape sequences, like \u0823.
    • a properties file with UTF-8 encoding
      A properties file with UTF-8 encoding has the advantage that you do not have to use escape sequences. However it might not be supported by i18n tools.

    A custom localization file can be used to

    • override system messages
      If any of the default messages in the installer is not appropriate for your use-case, you can change it by looking up the corresponding keys in the appropriate $INSTALL4J_HOME/resource/messages/messages_*.utf8 file and define the same key in your custom localization file to override that message.
    • localize your installer
      Anywhere in the install4j IDE where you can enter text that is used at runtime, you can use custom localization keys, i.e. variables of the form ${i18n:myKey}. Those keys are read from your custom localization file and offered by the variable selection dialog.

    If required, you can use parameters for your messages by using the usual {n} syntax in the value and listing the parameters in function-like manner after the key name in the variable instance. For example, if your key name is myKey and your message value is

    Create {0} entries of type {1}
    you can use a variable
    ${i18n:myKey("5", "foo")}
    in order to fill the parameters, so that the actual message becomes
    Create 5 entries of type foo
    However, in the context of localizing an installer this is rarely necessary. Should you need to include a literal variable expression {n} in the message, you have to quote it like '{'n'}'.

  • Additional languages
    With install4j, you can build multi-language installers that offer the user a choice between a number of languages. If you  add languages to the additional languages table, the installer becomes a multi-language installer, otherwise is is a fixed-language installer. When you add a new language, the language selection dialog is displayed. A new entry is then added to the table and you can configure the custom localization file by double-clicking on the appropriate cell.
  • Skip language selection dialog if auto-detected locale matches a supported language
    This check box ensures that the language selection is only displayed if the installer cannot find a match between a supported language (either principal or additional language) and the auto-detected locale at runtime. By default this option is not selected and the language selection dialog is always displayed.
  The principal language and the associated custom localization file can be overridden for each media file. In this way you can build multiple fixed-language installers each with a different language.