# Deployment Guide

# Localizing Your Deployment

This chapter describes ALUI localization features.

The purpose of this chapter is to make you aware of localization features so that you can assign a leader for any localization effort for your portal.

This chapter includes the following topics:

- About Localization
- Localizing Names and Descriptions of Objects Stored in the Database
- Adding a User Interface Language

## About Localization

ALUI products are fully Unicode enabled.

The ALI user interface uses the UTF-8 encoding of Unicode when delivering HTTP content to the browser.

The ALI user interface is localized into the following languages:

- Dutch
- English
- French
- German
- Italian
- Portuguese
- Spanish
- Japanese
- Korean
- Simplified Chinese
- Traditional Chinese

Each portal user can choose their preferred language by changing their locale under My Account | Edit Locale Settings. For example, if a portal user changes their locale setting to any of the German locales (Austria, Germany, Luxembourg, or Switzerland), the user interface language will change to German.

## Localizing Names and Descriptions of Objects Stored in the Database

You can localize names and descriptions of objects stored in the portal database. For example, if you have created a portlet with the name "Travel Portlet", you can give that portlet an associated German name of "Dienstreise Portlet". The German name will display for users who have chosen German as their user interface language.

Names and descriptions can be added or modified using the administrative user interface for each object. To add a localized name or description, open the object in the administrative editor and, on the Properties and Names page, specify the localized name and description and choose the appropriate language. For more information, refer to the online help.

The Localization Manager enables you to export and import localized names and descriptions in bulk. The Localization Manager can be used to translate a large number of names and descriptions at once. For example, if you want to translate all the portlet names and descriptions into French, German, and Italian, you can download an XML file containing the names and descriptions of all the objects in the ALUI system, edit the list, and then upload it back into the portal, effectively replacing all localized names and descriptions for all the objects in the portal database. (If an object is not set to support localized names, it is not included in the names and descriptions that are downloaded.)

Here is a small sample of a downloaded Names and Descriptions .xml file:

    <localizationtable>

      <languages count='9'>

        <language>de</language>

        <language>en</language>

        <language>es</language>

        <language>fr</language>

        <language>it</language>

        <language>ja</language>

        <language>ko</language>

        <language>pt</language>

        <language>zh</language>

      </languages>

      <segments count='554'>

        <segment stringid='0' itemid='1' classid='2'>

          <source language='en'>Administrators Group</source>

          <target language='de'>Administratorengruppe</target>

          <target language='en'></target>

          <target language='es'>Grupo Administradores</target>

          <target language='fr'>Groupe d'administrateurs</target>

          <target language='it'>Gruppo Amministratori</target>

          <target language='ja'></target>

          <target language='ko'></target>

          <target language='pt'>Grupo de administradores</target>

          <target language='zh'></target>

        </segment>

        <segment stringid='1' itemid='1' classid='2'>

          <source language='en'>Plumtree Administrators Group</source>

          <target language='de'>Plumtree-Administratorengruppe</target>

          <target language='en'></target>

          <target language='es'>Grupo Administradores de Plumtree</target>

          <target language='fr'>Groupe d'administrateurs Plumtree</target>

          <target language='it'>Gruppo Amministratori Plumtree</target>

          <target language='ja'></target>

          <target language='ko'>Plumtree </target>

          <target language='pt'>Grupo de administradores Plumtree</target>

          <target language='zh'>Plumtree </target>

        </segment>

    ...

      </segments>

    </localizationtable>

The Localization Manager uses XML so that the translations for all names and descriptions in all languages can be kept in one file. The "languages" element lists all the user interface languages in the portal. The "segments" element indicates the number of names and descriptions in the portal. Finally each "segment" element contains one name or description in the portal. The source element contains the source text for translation and the translated text is stored in the "target" element for each target language. (Languages are identified using standard ISO 639-1 two letter language identifiers.)

## Adding a User Interface Language

There are two types of languages that affect product deployment: user interface languages and search languages. Eleven user interface languages and can be easily extended to support additional languages. 62 search languages are hard-coded and not extensible.

The user interface languages are automatically detected when the portal is started by detecting the language folders that exist under the root folder, for example, \settings\i18n.

A user interface language can be easily added by creating a new language folder (using the ISO-639-1 language code). For example, if you wanted to add Czech as a user interface language, you would copy the "en" language folder under the i18n root folder and rename the folder "cz". After you do this and restart the portal, you will notice that you can select Czech as your language in the My Account | Edit Locale Settings page. If you do this, however, you will notice immediately that you are missing the style sheets for Czech. The additional elements required for a complete portal localization include:

- Style sheets
- Online help
- Javascript language files

### Adding Language Style Sheets

If you are adding a user interface language to the portal, you need to add the corresponding style sheets for that language. The CSSMILL was designed to make adding languages and generating all the language style sheets relatively easy. The folder \ptimages\tools\cssmill\prop-text is where all the language files are kept. Each language file in the prop-text folder has language-specific values for font style, font size, text style, and so on. This design makes it easy to change the default font for each language. For example, if you want the default font for the Japanese user interface to be Tahoma, then you can add Tahoma to the ja language file in the prop-text folder. Besides adding a language file, you must also edit the build.xml file to generate the new language style sheets.

For example, suppose you wanted to add Czech as a portal user interface language. Here are the precise steps to follow to add the Czech style sheets:

1. Navigate to the \ptimages\tools\cssmill\prop-text folder on the Image Service. Copy one of the existing files to the same folder and rename it using the language conventions in ISO-639-1 and ISO-3166. For example for Czech, we would rename the file to be "cz".
2. Open the new file in a text editor and make any necessary modifications for the new language. For example, if you want to add a new default language, you could change the line

    font.largest=20px verdana,arial,helvetica,"sans-serif"

to

    font.largest=21px Tahoma,"MS PGothic",Verdana,"sans-serif"

Be sure to add the new font for each font attribute in the language file.

3. Navigate to the \ptimages\tools\cssmill\prop-color folder on the Image Service. Edit every one of the existing color properties files and add the translation for the name of the color for the new language. For example, edit the file color.1.properties, copy the last colorscheme.name entry. Change the name according to the new language ID chosen in Step 1. In this example, we would copy and edit the line

    colorscheme.name.zh=\\u6DE1\\u7D2B

to

    colorscheme.name.cz=Lavendelblauw

4. Modify the Ant build script (build.xml) to add the new language to the style sheet collection by following the steps below. (This is the only way the script knows to create versions of the new style sheet for each of the languages supported by the portal.)

1. Navigate to the \cssmill directory and open the build.xml file in a text editor.
2. Add an entry for the new language within the make_main_css target: Copy the last <antcall target="make_main_language_css"> entry and paste it at the end of the list. Modify the <param name="LANGUAGE" value="pt"/> tag by changing the value ("pt") to the language id used in the name of the new language file created in Step 1 above. In this example, the new language ID for Czech is "cz".
3. Add an entry for the new language within the make_508_css target: Copy the last <antcall target="make_508_language_css"> entry and paste it at the end of the list. Modify the <param name="LANGUAGE" value="pt"/> tag by changing the value ("pt") to the language id used in the name of the new language file created in Step 1 above. In this example, the new language id for Czech is "cz".
4. Add an entry for the new language within the make_comm_color_css target: Copy the last <antcall target="make_comm_lang_color_css"> entry and paste it at the end of the list. Modify the <param name="LANGUAGE" value="pt"/> tag by changing the value ("pt") to the language id used in the name of the new language file created in Step 1 above. In this example, the new language id for Czech is "cz".
5. Add an entry for the new language within the append_index_for_color target: Copy the last <concat destfile="${INDEX}" append="true">mainstyle${COLOR}-pt.css=${colorscheme.name.pt}</concat> entry and paste it at the end of the list. Change the language ID in the new line to the new language id. In this example, change the language ID "pt" to the new language id for Czech "cz". The new line would look like this:
6. <concat destfile="${INDEX}" append="true">mainstyle${COLOR}-nl.css=${colorscheme.name.nl}</concat>
7. Save the file and close it.

5. After the build script modifications have been made, create the new style sheets by running the make_all batch file. (See the directions in the previous section.)
6. Verify that the new language style sheets were created based on the new language property file. Navigate to the cssmill\css directory and make sure that there are 20 new style files with the new language ID you chose in Step 1 (that is, mainstyle-nl.css). For further verification, open the community-themes.txt file (in the \css directory) and confirm that there is a new entry corresponding to the language ID used in the new language property file.
7. After confirming that your changes are correct, move the new style sheet files from the \cssmill\css folder to the \ptimages\imageserver\plumtree\common\public\css folder.
8. Restart the Application Server.

### Adding an Online Help Language

The online help is localized into core languages: English, French, German, Italian, Portuguese, Spanish, Japanese, Korean, Simplified Chinese, and Traditional Chinese. The online help files are stored on the Image Service under the root folder, for example, \imageserver\plumtree\portal\private\help.

The online help is compiled using RoboHelp X5. Each language folder contains a separate help project for that language. All Western European language projects are compiled using the standard English version of RoboHelp. The Asian languages are compiled using the corresponding Asian language version.

### Adding Javascript Language Files

Several user interface components are written in client-side Javascript. These components also contain user interface text messages. These string files must also be localized when adding a language to the portal.

The Javascript components are located on the Image Service. The Javascript component string files are located in the portal installation directory (for example, C:\Program Files\plumtree), in these folders:

- \ptimages\imageserver\plumtree\common\private\js\jscontrols\120449\strings
- \ptimages\imageserver\plumtree\common\private\js\jsdatepicker\118523\strings
- \ptimages\imageserver\plumtree\common\private\js\jsutil\118981\strings

The ALI convention for Javascript string files is somewhat different than for XML files. Instead of placing each language file in a separate folder, we have given each language file a suffix consisting of a dash and the language code. For example, to create a language file for Czech, you would copy the English file and replace the "-en" suffix with "-cz".

### Language Support in the Knowledge Directory

The search index is stored in Unicode (UTF-8) and supports 62 languages in total. The Search engine supports advanced stemming and tokenization for 23 languages and basic tokenization for an additional 39 languages. The languages supported for advanced stemming and tokenization are:

Chinese (Simplified) | Chinese (Traditional) | Czech
Danish | Dutch | English
French | Finnish | German
Greek | Hungarian | Italian
Japanese | Korean | Norwegian (Bokmål)
Norwegian (Nynorsk) | Polish | Portuguese
Romanian | Russian | Spanish
Swedish | Turkish |