# Customization Overview

# Localization

This chapter provides an overview of localization options for an AquaLogic User Interaction deployment.

## About Localization in AquaLogic User Interaction

All AquaLogic User Interaction products are fully Unicode-compliant and use UTF-8 encoding.

For additional details on localization and AquaLogic Interaction, see “Localizing Your Portal” in the Administrator Guide for AquaLogic Interaction.

For developer documentation on localizing custom Web servics and portlets, see “Internationalizing Your Customizations” in the Developer Documenation.

### Localization and the ALI User Interface

Out of the box, the AquaLogic Interaction user interface is localized into eleven languages: Dutch, English, French, German, Italian, Portuguese, Spanish, Japanese, Korean, Simplified Chinese, and Traditional Chinese.

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

You can create additional languages for the AquaLogic Interaction user interface. For details, see Adding Custom Languages.

### Localization and Activity Services

Major Activity Services such as Collaboration and Publisher are localized to the same eleven languages as the AquaLogic Interaction user interface. Smaller Activity Services are localized to a subset of those languages.

It is possible to add custom languages to the Activity Services; however, these customizations are not recommended unless done by BEA professional services. To engage BEA professional services, contact your BEA representative.

### Localization and Search

The Search index is stored in UTF-8 Unicode and supports 62 languages.

The Search engine supports advanced stemming and tokenization for the following 23 languages:

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 |

In addition to those 23 languages, the Search engine provides basic tokenization support for an additional 39 languages.

The Search engine languages are hardcoded and cannot be customized.

## Localizing Portal Objects

You can localize the names and descriptions of portal objects. For example, if you create a portlet with the name “Travel Portlet,” it is possible to associate the name “Dienstreise Portlet” with the portlet for display to German locales.

Names and descriptions are added or modified using the administrative user interface for each object. When the object is opened in the administrative editor, the Properties and Names page allows you to specify a name and description for any available language.

For details on editing object properties, see the AquaLogic Interaction online help.

### The Localization Manager

You can export and import localized names and descriptions in bulk with the Localization Manager. Names and descriptions of objects are exported from the AquaLogic Interaction database into an XML file. The XML file contains name and description strings and their translations. Translations are added or edited in the XML file, and then the names and descriptions imported into the ALI database using the Localization Manager.

This is a small sample of exported names and descriptions:

    <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'>ALI Administrators Group</source>

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

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

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

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

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

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

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

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

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

        </segment>

    …

      </segments>

    </localizationtable>

In the exported XML:

- <languages>`` contains all of the user interface languages supported in the portal.
- <segments>`` contains one or more `<segment>` nodes. The `count` element shows the total number of name or description strings in the portal.
- `<segment>` contains a single name or description string and its translations. The contained `<source>` node is the original, to be translated text. The `<target>` nodes are the translations of the `<source>` node text.

The `language` element of each node is the ISO 639-1 two letter identifier for the given language.

## Adding Custom Languages

This section covers adding custom languages to the AquaLogic Interaction portal user interface. Adding custom languages to other AquaLogic User Interaction products, such as Collaboration or Publisher must be done by BEA professional services.

Adding a custom language to the AquaLogic Interaction portal user interface is a four step process:

1. Create a directory for the new language. For details, see Adding the Language Directory.
2. Add style sheets.
3. Translate online help
4. Translate Javascript language files.

Caution: | Customizing OpenFoundation language resources is currently not supported.

### Adding the Language Directory

The portal component loads supported languages based on the contents of the directory <PT_HOME>/ptportal/<ver>/i18n. This directory contains one subdirectory for each supported language, each named with the ISO-639-1 language code.

The first step in adding a new language to the portal is to add a directory for that language to <PT_HOME>/ptportal/<ver>/i18n. To do this:

1. Create a new directory under <PT_HOME>/ptportal/<ver>/i18n. The directory must be named the ISO-639-1 language code of the language you intend to add.
2. Copy the contents of the i18n/en directory to the new directory.
3. Restart the portal. The new language is now available on the My Account | Edit Locale Settings page.

### Adding Language Style Sheets

The second step in adding a new language to the portal is to add style sheets for that language. This is done by editing template files that are built into CSS by the AquaLogic Interaction cssmill component.

The following steps describe this process, using the Czech language as an example:

Note: | Extended characters must be translated into their Unicode escaple (\uxxxx), and the leading backslash must be escaped with a second backslash (\\uxxxx).

1. On the Image Service, navigate to ptimages/tools/cssmill/prop-text. This directory contains the font and text-related properties for each language.
2. Copy the en file to the same directory, naming it with the ISO-639-1 language code of the language, for example, cz for Czech.
3. Edit the new file, making any necessary modifications for the new language.
4. Navigate to ../prop-color. This directory contains color scheme properties for all languages.
5. Add a colorscheme.name.<language code> line to each file and setting it equal to the name of the color scheme in the language. For example, in color.1.properties the English language color scheme is named with this line:

    colorscheme.name.en=Plum

To create a new name for the Czech locale, add a line:

    colorscheme.name.cz=Lavendelblauw

6. Modify the appropriate Ant script so that the new language builds. The process for doing this is slightly different depending on whether the script is being run by Ant 1.5 or 1.6.

For Ant 1.6

1. Edit ptimages/tools/cssmill/css-mill-ant-1-6.xml.
2. Add an entry for the new language under `<macrodef name="make_main_css">`, in the `<sequential>` node.

For Czech, the added line would be:

    <make_main_language_css LANGUAGE=”cz” COLOR=”@{CIKIR}”/>

3. Add an entry for the new language under `<macrodef name="make_508colors_css">`, in the `<sequential>` node.

For Czech, the added line would be:

    <make_508_lang_color_css LANGUAGE="cz" COLOR="@{COLOR}" CSSPATH="@{CSSPATH}" />

4. Add an entry for the new language under `<macrodef name="make_comm_color_css">`, in the `<sequential>` node.

For Czech, the added line would be:

    <make_comm_lang_color_css LANGUAGE="cz" COLOR="@{COLOR}" CSSPATH="@{CSSPATH}" INDEX="@{CSSPATH}index.properties"/>

5. Add an entry for the new language under
   `<macrodef name="append_index_for_color">`, in the `<sequential>` node.

For Czech, the added line would be:

    <concat_color destfile="@{INDEX}" keyprop="mainstyle@{COLOR}-cz.css" valprop="pre@{COLOR}.colorscheme.name.cz"/>

6. Save and close css-mill-ant-1-6.xml.

For Ant 1.5

7. Edit ptimages/tools/cssmill/css-mill-ant-1-5.xml.
8. Add an entry for the new language under `<target name="make_main_css" depends="make_css_dir">`.

For Czech, the added line would be:

    <antcall target="make_main_language_css"><param name="LANGUAGE" value="cz"/></antcall>

9. Add an entry for the new language under `<target name="make_508colors_css">`.

For Czech, the added line would be:

    <antcall target="make_508_lang_color_css"> <param name="LANGUAGE" value="cz"/><param name="COLOR" value="${COLOR}"  /></antcall>

10. Add an entry for the new language under `<target name="make_comm_color_css">`.

For Czech, the added line would be:

    <antcall target="make_comm_lang_color_css"><param name="LANGUAGE" value="cz"/></antcall>

11. Add an entry for the new language under
    `<target name="append_index_for_color">`.

For Czech, the added line would be:

    <concat destfile="${INDEX}" append="true">mainstyle${COLOR}-cz.css=${colorscheme.name.cz}
    </concat>

12. Save and close css-mill-ant-1-5.xml.

7. Update the CSS stylesheets by running the <PT_HOME>/ptimages/tools/cssmill/make_all script.
8. Verify that the stylesheets have been updated with the new language.

1. Verify that there are 20 files with the new language ID in <PT_HOME>/ptimages/tools/cssmill/css.
2. Open <PT_HOME>/ptimages/tools/cssmill/css/community-themes.txt and confirm that there is an entry for the newly added language ID.

9. Move the updated stylesheets from cssmill/css to the Image Service, <PT_HOME>/ptimages/imageserver/plumtree/common/public/css.
10. Restart the Image Service.

### Adding an Online Help Language

Online help is located on the Image Service under each product’s private/help directory. For example, the AquaLogic Interaction online help files are located in imageserver/plumtree/portal/private/help. Under this directory are two directories, std for standard online help and 508 for Section 508-compliant help. Under those directories are directories for each supported language.

For example, the standard English online help for AquaLogic Interaction is located in imageserver/plumtree/portal/private/help/std/en.

Online help is compiled using RoboHelp X5 for European languages and RoboHelp 2002 for Asian languages. RoboHelp projects are made available upon request. Contact docsupport@bea.com for details.

### Adding Javascript Language Files

You must localize string files for various Javascript user interface components when adding a language to the portal. The following Javascript components require you to add a string file with each added language:

- jscontrols
- jsdatepicker
- jsutil

These components are located on the Image Service, under imageserver/plumtree/common/private/js. The string files are located under each component’s directory, in LATEST/strings.

To add a string file for the new language:

1. Copy the English file to a file in the strings file suffixed with the ISO-639-1 code of the language to be added. For example, to add a Czech string file to jscontrols, copy

LATEST/strings/PTControls-en.js

to

LATEST/strings/PTControls-cz.js.

2. Translate the copied string file to the language being added.