Setup Factory for Windows Installer

Translating Text

Some text fields have a "Translate" checkbox associated with them in order to make it easier to localize your text using message IDs. This checkbox allows you to switch between the literal text (containing the message ID) and the translated text.

For example:

Text translation is done by assigning localized text to a message ID. Localized text is text that is meant to be used with a specific language, such as English-US. The message ID is referenced using a pre-processor directive, such as !(loc.WelcomeDlgTitle), that will automatically be replaced by the appropriate language text whenever the project is built.

The Translate checkbox next to a text field is a way to switch between displaying the actual message ID, or the text that it represents.

When the Translate checkbox is unchecked, the raw, untranslated text is displayed. Normally this untranslated text will contain a reference to a message ID, such as !(loc.WelcomeDlgDescription).

When the Translate checkbox is checked, the translated text is displayed. This means that any single message ID in the text field is replaced by the actual text that is associated with that ID for the currently selected language. So, for example, instead of seeing !(loc.UIButtonNext), you would see the text that is assigned to UIButtonNext in the current language, such as "&Next >" or "&Suivant ->".

Any changes you make to the translated text are applied directly to the message ID and will affect other places where the same message ID is used. For example, if you changed the translated text for the Next button on the WelcomeDlg dialog to read "Start" instead, that new text would appear on all of the Next buttons in your project. In order to change the button text just for one dialog, you'd need to uncheck the Translate checkbox, and then enter "Start" as the untranslated text. If you wanted the word "Start" to be translated, you would then check the Translate checkbox again, and assign a message ID for the new text.

If a localizable text field does not contain a message ID, clicking the Translate checkbox will open the Set Message ID dialog. This allows you to create a new message ID (or select an existing one) that can then be translated to show different text in different languages.

Note that the text field doesn't have to contain a message ID; if you want the same text to appear in all languages, you can leave the Translate checkbox unchecked and enter the text directly into the text field.

You can select the current language by using the language drop-down on the Dialogs dialog (Project > Dialogs). The language drop-down controls which language you will see and edit in all localizable text fields when the Translate checkbox is checked.

More Information

Locale Identifiers (LCIDs)

Wix Help File: Preprocessor

Wix Help File: Localization and your MSI file (also available on MSDN Blog)

MSDN Online: Localizing a Windows Installer Package

MSDN Online: Language Identifier Constants and Strings

MSDN Online: Language Identifiers

MSDN Online: Locales and Languages