cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to Install Components Based on Language

How to Install Components Based on Language

Summary

How to specify which language-based components are installed at runtime

Synopsis

A language-dependent component can be configured to install only on certain languages. The method to configure this behavior will depend on the project type used.

Discussion

Basic MSI and InstallScript MSI Projects
To specify whether a component is installed based on the target system?s language, use the Windows Installer property SystemLanguageID in the component?s Condition setting.

For example, the following condition allows the component?which may or may not be marked as French in InstallShield?to be installed only onto French (France) systems:

SystemLanguageID = 1036

Other properties that can be used to determine language characteristics at run time are UserLanguageID, which is the numeric identifier of the end user?s default language, and ProductLanguage, which is the identifier of the language in which the installation is running.

Refer to the following article for The Language IDs for Various Languages.


InstallScript Projects
During run time of InstallScript installations, you can control the languages that your installation supports by calling the FeatureFilterLanguage function.

In the OnFilterComponents event handler, the framework typically calls this function with the languages that match the target system so that only the appropriate components are installed. By calling FeatureFilterLanguage, you can override this default behavior to install or prevent the installation of components based on any language criteria that you specify.

The FeatureFilterLanguage function filters (excludes) files from file transfer based on language. By default, all languages included in the media build are unfiltered (included). You must call FeatureFilterLanguage for each language you wish to filter or unfilter.

To filter language-specific components during the installation:
  1. Filter (exclude) all languages by calling FeatureFilterLanguage with ISLANG_ALL in the parameter nLangID and bFiltered set to TRUE.
  2. For each language that you want to install, call FeatureFilterLanguage with the appropriate language constant in nLangID and with the parameter bFiltered parameter set to FALSE. Each call unfilters (includes) components for the language specified in nLangID.
Note: You cannot specify multiple language constants in the nLangID parameter by using the OR operator ( | ). Specifying multiple language constants causes the function to perform incorrectly.

Refer to the Additional Information section below for more details on FeatureFilterLanguage.

Additional Information

Marking Components as Language Dependent
Language Identifiers
Language Support for InstallScript
FeatureFilterLanguage Reference
FeatureFilterLanguage Example

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Jul 18, 2018 08:41 PM
Updated by: