Sun Directory Server Enterprise Edition 7.0 Localization Guide

This document explains how to organize the SunTM Directory Server Enterprise Edition software
resource files, add support for new languages, and customize the existing software resources.

Sun Directory Server Enterprise Edition is currently localized into five languages: French, German,
Japanese, Spanish, and Simplified Chinese. Localizing the administration browser interface (DSCC) and the
command-line interface are the main requirements for supporting a new language that
is not part of the Sun Directory Server Enterprise Edition Product.

This technical note describes the entire localization process, including which files store localized
messages, where these files are located, and how to add a new language
to Sun Directory Server Enterprise Edition.

This document is applicable only to Sun Directory Server Enterprise Edition version 7.0.

Organization of the Resource Files

This section describes the organization of the files that contain Sun Directory Server
Enterprise Edition messages.

The application messages are stored in the following file formats:

.properties files (Java properties) as jar files

.res files (ICU resource text files)

Messages that are displayed in the command-line interface are stored in both of
these file formats. Messages that are displayed in the Directory Service Control Center
(web interface) are stored only in Java properties file format (.jar files).

All of these files are compiled and delivered as native packages (for Solaris)
and as zip files (for all platforms). The resource files can be
easily modified to add new locales or according to the application requirements. The following
sections describe the organization of the software resource files.

Note - Information about file organization is accurate up to and including Sun Directory Server
Enterprise Edition 7.0.

Java Properties Files

The Java properties files contain most of the software messages that are displayed
in the Directory Service Control Center (DSCC) Administration Console. Java properties files should
be saved in escaped Unicode format, otherwise, multi-byte characters are displayed incorrectly.

To ensure the correct format of the Java properties files, type the following
command after each change:

The Resources.properties file is an exception to this rule. Apostrophes in this file
must only be doubled when the message contains a parameter in the form
"{n}", where n is a number from 0 to 9. In this case
the translation of the following string:

"Error reading installation configuration"

would be as follows:

"Erreur lors de la lecture de la configuration de l'installation"

However, the translation of the following string:

"Install error Code: {0}<br /><br />Stack:<br />{1}"

would be as follows:

"Code d''erreur d''installation : {0}<br /><br />Pile:<br />{1}"

To avoid problems with apostrophes, you can use the right single quotation mark
unicode character (') (U+2019) instead. Note, however, that this character does not display
correctly in the Microsoft Windows command-line interface.

ICU Resource Files

ICU Resource Bundles are the resource files that contain most of the software
messages that are displayed in Directory Server and Directory Proxy Server, and common
messages in the native code. As is the case for the Java properties
files, you should convert the ICU files into an escaped Unicode format to
prevent multi-byte characters from being displayed incorrectly.

To ensure the correct format of ICU text files, type the following
command after each change:

ICU Resource Bundle text files must be compiled into .res files by using
the genrb command. The genrb command is platform-dependent, that is, the resulting .res
files are only usable on the platform on which they were created.

Handling Special Characters

In the ICU resource files, all apostrophes (') (ASCII 39) in the
translated messages must be doubled. See the previous section for examples.

In the ICU resource files, the double quote character (") (ASCII 34) must
be escaped by a backslash. For example, the following string:

"Using \"{0}\" as default value for {1} option"

would be translated into French as follows:

"Utilisation de \"{0}\" comme valeur par défaut pour l''option {1}"

Adding New Language Support to the Directory Service Control Center

The Directory Service Control Center (DSCC) is the web-based administration console for Sun
Directory Server Enterprise Edition. This chapter shows the basic steps involved in adding
new language support to the DSCC and customizing the Sun Directory Server Enterprise
Edition localization resource files.

File Structure and Naming Conventions

The files that contain messages are located in the following directory:

directory-installation-path/resources/dcc7app/WEB-INF/lib/dccapp.jar

The common UI resource catalog is located in websdk/lib/cc_locale.jar (from the file
directory-installation-path/lib/web/websdk.zip).

The Java properties file naming conventions are as follows:

com/sun/web/admin/directory/dcc/resources/Resources_locale.properties

and

com/sun/web/ui/resources/Resources_locale.properties

Adding New Language Support to the DSCC User Interface

The following procedure describes how to add a new language to the
DSCC user interface.

To add a new language to the slapwcli_l10n.jar resources catalog file, do the
following:

Unjar the directory-installation-path/lib/jar/slapwcli.jar file to a temporary directory.

Translate the English language file, messages/slapw.properties, into the required language.

Move the translated file to slapw_locale.properties in the messages directory.

For example, if you are creating a Dutch language resource file, move it
to messages/slapw_nl.properties.

Convert the file into escaped Unicode by using the following command:

# native2ascii source-filenamedestination-filename

Add the resource file to slapwcli_l10n.jar by typing the following command:

# jar -uvf slapwcli_l10n.jar temporary_directory

Replace the file directory-installation-path/lib/jar/slapwcli_l10n.jar with your new .jar file.

To add a new language to the slapycli_l10n.jar resources catalog file, do the
following:

Unjar the directory-installation-path/lib/jar/slapycli.jar file to a temporary directory.

Translate the English language file, messages/slapy.properties, into the required language.

Move the translated file to slapy_locale.properties in the messages directory.

For example, if you are creating a Dutch language resource file, move it
to messages/slapy_nl.properties.

Convert the file into escaped Unicode by using the following command:

# native2ascii source-filenamedestination-filename

Add the resource file to slapycli_l10n.jar by typing the following command:

# jar -uvf slapycli_l10n.jar temporary_directory

Replace the file directory-installation-path/lib/jar/slapycli_l10n.jar with your new .jar file.

To add a new language to the slaptcli_l10n.jar resources catalog file, do the
following:

Unjar the directory-installation-path/lib/jar/slaptcli.jar file to a temporary directory.

Translate the English language file, messages/slapt.properties, into the required language.

Move the translated file to slapt_locale.properties in the messages directory.

For example, if you are creating a Dutch language resource file, move it
to messages/slapt_nl.properties.

Convert the file into escaped Unicode by using the following command:

# native2ascii source-filenamedestination-filename

Add the resource file to slaptcli_l10n.jar by typing the following command:

# jar -uvf slaptcli_l10n.jar temporary_directory

Replace the file directory-installation-path/lib/jar/slaptcli_l10n.jar with your new .jar file.

To add a new language to the dpcfgcli_l10n.jar resources catalog file, do the
following:

Unjar the directory-installation-path/lib/jar/dpcfgcli.jar file to a temporary directory.

Translate the English language file, messages/cli.properties, into the required language.

Move the translated file to cli_locale.properties in the messages directory.

For example, if you are creating a Dutch language resource file, move it
to messages/dpcfg/cli_nl.properties.

Convert the file into escaped Unicode by using the following command:

# native2ascii source-filenamedestination-filename

Add the resource file to dpcfgcli_l10n.jar by typing the following command:

# jar -uvf dpcfgcli_l10n.jar temporary_directory

Replace the file directory-installation-path/lib/jar/dpcfgcli_l10n.jar with your new .jar file.

To add a new language to the dpcfg_l10n.jar resources catalog file, do the
following:

Unjar the directory-installation-path/lib/jar/dpcfg.jar file to a temporary directory.

Obtain the three English language files (context.properties, core-context.properties, and generic.properties) in the
directory directory-installation-path/lib/jar/dpcfg.jar and translate them into the required language.

Move the translated files to context_locale.properties, core-context_locale.properties, and generic_locale.properties in the messages directory.

For example, if you are creating a Dutch language resource file, move them
to the following files: