Bewerken

Delen via


Localizing a Windows Installer Package

For general information about localization, see Globalization Services. Localizing a Windows Installer package requires modifying the strings displayed by the user interface and may also require adding or modifying product resources. For example, localization may include the addition of international DLLs and localized files to the product.

To localize a Windows Installer package

  1. Prepare for localization when authoring the original installation package. Design the layout of localized files such that different language versions can safely coexist when installed on the user's computer. Organize files requiring localization into separate components and install these files into separate directories. Author a base installation database that has a neutral control page. See Preparing a Windows Installer package for localization.
  2. Always set the code page of the database being localized prior to adding any localized data. If the code page of the database being localized is neutral, see Setting the code page of a database. To determine the code page see Determining an installation database's code page.
  3. Import a localized Error table and ActionText table into the database. For more information, see Localizing the Error and ActionText Tables for a list of languages supported by the Microsoft Windows Software Development Kit (SDK). You may import these tables using Msidb.exe or MsiDatabaseImport.
  4. Modify any of the other localizable columns in the database using a table editor or SQL queries. For the SQL access functions, see Working with Queries. The topics for the database tables identify which database columns can be localized. For more information, see the list of tables in Database Tables.
  5. Set the ProductLanguage property in the Property table to the LANGID of the database. When authoring a package as language neutral, set the ProductLanguage property to 0 and use the MS Shell Dlg font as the text style for all authored dialog boxes. Because some fonts do not support all of the character sets, you can ensure that the text is correctly displayed on all localized versions of the operating system by using this font.
  6. Set the language field of the Template Summary property to reflect the LANGID of the database.
  7. If the text strings in the summary information stream are localized, set the Codepage Summary property to the code page.
  8. Set the ProductCode property in the Property table and set the package code in the Revision Number Summary property to a new package code. A localized product is considered a different product. For example, the German and English versions of an application are considered two different products and must have different product codes.
  9. Localization may require modifying resources that already exist or the addition of new resources such as files or registry keys. Check to be sure that the component code is changed for every existing component that has had a new resource added. Other modifications may also require changes to a component's code. For more information see Changing the Component Code.
  10. Be sure to save localization and other changes to the database by saving the package with the editing tool or by calling MsiDatabaseCommit.

For more information, see A Localization Example.