[Languages] section

Inno Setup

[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:

Non-Unicode Inno Setup:

  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), and whose LanguageCodePage setting matches the system code page.
  2. If no match is found, it searches for just a primary language identifier and code page match. If two or more available languages have the same primary language identifier and code page, it selects the first one listed in the [Languages] section.
  3. If no match is found, it defaults to the first language specified in the [Languages] section.

Unicode Inno Setup:

  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. On non Unicode Inno Setup languages that can't be displayed properly on the user's system will be hidden. 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 file(s) to read the default messages from. The file(s) must be located in your installation's source directory when running the Setup 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.

When multiple files are specified, they are read in the order they are specified, thus the last message file overrides any messages in previous files.

See the [Messages] section help topic for details on the format of .isl files.

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 Setup 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.

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 Setup 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.

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 Setup 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.

Example:
InfoAfterFile: "infoafter-Dutch.txt"