[Languages] section

Inno Setup supports multilingual installations. The [Languages] section defines the languages to make available to the Setup program.

Setup determines the default language to use for its messages in the following order:

  1. It searches for a language whose LanguageID setting (normally specified in the [LangOptions] section of the language's .isl file) matches both the primary language identifier and sublanguage identifier of the current user's UI language or locale (depending on the setting of LanguageDetectionMethod).
  2. If no match is found, it searches for just a primary language identifier match. If two or more available languages have the same primary language identifier, it selects the first one listed in the [Languages] section.
    Exception: Simplified Chinese is excluded from consideration in this step if the user's UI language or locale (depending on the setting of LanguageDetectionMethod) is Traditional Chinese, and vice versa.
  3. If no match is found, it defaults to the first language specified in the [Languages] section.

If the ShowLanguageDialog [Setup] section directive is set to yes (the default), a Select Language dialog will be displayed which gives the user an opportunity to override the language Setup chose. See the [LangOptions] section help topic for details.

The following is an example of a [Languages] section. It defines two languages: English, based on the standard Default.isl file, and Dutch, based on a third-party translation.

[Languages]
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
Name  (Required)

The internal name of the language, which you can set to anything you like. This can used as a prefix on [LangOptions] or [Messages] section entries to have the entries apply to only one language. The {language} constant returns the internal name of the selected language.

Example:
Name: "en"
MessagesFile  (Required)

Specifies the name(s) of the .isl file(s) to read the default messages from. The file(s) must be located in your installation's source directory when running the compiler, unless a fully qualified pathname is specified or the pathname is prefixed by "compiler:", in which case it looks for the file in the compiler directory.

Each message file may contain a [LangOptions] section, a [Messages] section, and a [CustomMessages] section.

When multiple files are specified, they are read in the order they are specified, thus the last message file overrides any language options or messages from previous files. Any language options or messages in the main script override the ones from message files.

If an Unicode file is used, it must be UTF-8 encoded.

Examples:
MessagesFile: "compiler:Dutch.isl"
MessagesFile: "compiler:Default.isl,compiler:MyMessages.isl"
LicenseFile

Specifies the name of an optional license agreement file, in .txt or .rtf (rich text) format, which is displayed before the user selects the destination directory for the program. This file must be located in your installation's source directory when running the compiler, unless a fully qualified pathname is specified or the pathname is prefixed by "compiler:", in which case it looks for the file in the compiler directory.

If an Unicode .txt file is used, it must be UTF-8 (with or without a BOM) or UTF-16LE encoded.

Example:
LicenseFile: "license-Dutch.txt"
InfoBeforeFile

Specifies the name of an optional "readme" file, in .txt or .rtf (rich text) format, which is displayed before the user selects the destination directory for the program. This file must be located in your installation's source directory when running the compiler, unless a fully qualified pathname is specified or the pathname is prefixed by "compiler:", in which case it looks for the file in the compiler directory.

If an Unicode .txt file is used, it must be UTF-8 (with or without a BOM) or UTF-16LE encoded.

Example:
InfoBeforeFile: "infobefore-Dutch.txt"
InfoAfterFile

Specifies the name of an optional "readme" file, in .txt or .rtf (rich text) format, which is displayed after a successful install. This file must be located in your installation's source directory when running the compiler, unless a fully qualified pathname is specified or the pathname is prefixed by "compiler:", in which case it looks for the file in the compiler directory.

This differs from isreadme files in that this text is displayed as a page of the wizard, instead of in a separate Notepad window.

If an Unicode .txt file is used, it must be UTF-8 (with or without a BOM) or UTF-16LE encoded.

Example:
InfoAfterFile: "infoafter-Dutch.txt"