Specific Localization Concerns

Localizing Resources

The developer may find that he or she wants to localize resources (such as license agreements, side panels, billboards, and custom icons) for specific countries. This is possible in InstallAnywhere. Actions such as the License Agreement panel and LaunchAnywhere serialize the paths and filenames to their resources and their dynamic strings to the locale files. The developer can then change these paths and the filenames. For example, to localize the license agreement, do the following:

1.
Make sure to include every resource in the Files task. Installers will not have access to resources not specified in this task.

2.
Find the line in the locale file that contains the text LicenseAgr.#.FileName. Specify the filename of the file that contains the localized license agreement (for instance, License_fr.html). Do not type the fully qualified absolute pathname to the file—just type the filename itself.

3.
Find the line that contains the text LicenseAgr.#.Path. Specify the pathname to the file that contains the localized license agreement (on the local file system).

Localizing Custom Installer Labels

Custom labels that match the installer panels are not automatically localized. To match labels, do the following:

1.
Build the installer as you normally would.

2.
Locate the installer's Locale directory.

3.
Open the custom_en file in WordPad or another text editor.

4.
Search for the Installer.1.installLabelsAsCommaSeparatedString variable. This variable should contain the added installer labels.

5.
Copy and paste this variable into the other locale files.

6.
Finally, provide translations for these labels in their respective files.

Localizing Custom Code

The InstallAnywhere API provides a simple means for localizing custom code actions, panels, and consoles. Here's an example of how to localize a java.awt.Label inside a custom code panel. The custom code panel's setupUI method should resemble

public boolean setupUI(CustomCodePanelProxy ccpp)
{
Label myLabel = new Label();
myLabel.setText(ccpp.getValue(MyCustomCodePanel.myLabel)));
}

The CustomCodePanelProxy, InstallerProxy, CustomCodeConsoleProxy, and UninstallerProxy classes provide access to the getValue method, which takes a string as a parameter representing the key portion of the key/value pair as defined in InstallAnywhere's international resource files. Developers can create any name for the key that they would like, as long as it doesn't conflict with previously defined keys. Developers can even use a preexisting key to obtain a string that has already been translated in InstallAnywhere's resource files.

To make the new locale keys exist in every installer project, update the static text. To make them exist only in the current project, update the dynamic text. The dynamic text is regenerated every time the developer saves, so update the files every time the project is changed. This is another good reason to have the installer design done before starting the localization process.

Best Practices for Localizing

Complete the installer design before translating the locale files. Changes to the installer design can affect the layout and content of the locale files. Changes to these files may require costly retranslation work.

Stick with the default text whenever possible. All default text is already translated, saving the team time and effort.

Test the installers on systems running in the foreign locale. This will help shake out any errors where the proper strings are not translated in the locale files.

Make sure every resource referenced in the locale files is included in the installer. This is especially true for license agreements, readme's, and other commonly translated documents.

InstallAnywhere's comprehensive locale support is just one of the features that stand out from other deployment solutions. InstallAnywhere Enterprise Edition offers support for 29 different locales, both single-byte “Western” locales and double-byte locales. Nearly every text string in your InstallAnywhere installer project can be localized, and translations of all of InstallAnywhere's default text are already provided.

Changing Localized Text

It's not necessary to change the localized text in the installer unless one of the following is true:

  • You've added or modified installer items that are displayed to the end-user during installation (new components, features, license agreements, important information notes, and so on) that don't have default translations.

  • You would like to modify the provided default translation.

  • You are using actions that return install panels (such as the Choose Folder panel or Get Password panel).

Modifying Localized Text

1.
Include any localized files (license agreements, graphics for billboards, and so on) in your installer. If these are not included, they won't be included with the installer and won't be available when end-users run the installer. Including these files in your installer means that InstallAnywhere will use them during the install process and install them onto the destination system. If you don't want these files installed, place them in the Do Not Install Magic Folder, and they won't be placed onto the destination system.

2.
Build your installer. After this first build, a folder named <projectname> locales will be created in the same folder as the .iap_xml file.

3.
A series of files called custom_en, custom_fr, and so on, will be placed in this Locales folder—one for each language you chose to build for in the Project | Locales task in the advanced designer. These are language resource files and contain localized text strings, as well as pointers to filenames containing localized information to embed in your installer.

4.
For each language that you want to customize, edit the appropriate language resource file. Use escaped Unicode to encode for these files.

For example, if you want to specify a custom license agreement for French, edit the custom_fr file.

NOTE

Make sure that your localized license agreements and important note files are added to the installer (via the Files task); otherwise, they will not be bundled into the installer.


Changing Default Translations Provided in Language Packs

1.
Follow the directions for changing localized text.

2.
Modify the language resource files located in the resourcei18nresources folder inside of your InstallAnywhere folder. These files contain the defaults for all strings, both the static defaults and the strings that are externalized to the locales (Table 21.1).

Table 21.1. Language Codes
LanguageCountry CodeLanguage Group
CatalanCAWestern
CzechCSEastern
DanishDAWestern
GermanDEWestern
GreekELEastern
EnglishENWestern
SpanishESWestern
BasqueEUWestern
FinnishFIWestern
FrenchFRWestern
French (Canada)FR_CAWestern
HungarianHUEastern
IndonesianIDEastern
ItalianITWestern
JapaneseJAEastern
KoreanKOEastern
DutchNLWestern
NorwegianNOWestern
PolishPLWestern
PortuguesePTWestern
Portuguese (Brazil)PT_BRWestern
RussianRUEastern
SlovakSKWestern
SlovenianSLWestern
SwedishSVWestern
ThaiTHEastern
TurkishTREastern
Chinese (Simplified)ZH_CNEastern
Chinese (Traditional)ZH_TWEastern

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.135.80