Technical Note: Sun Java System Access Manager Localization Guide

Hands-on Lab Format

The procedures in the following sections provide a practical summary of all procedures discussed in this document:

These procedures add the Dutch language to Access Manager. Nevertheless, any other language supported by a browser can be added to Access Manager. An example at the end of this section shows how to generate an MO file within UTF-8 encoding.

Adding a New Language to the Supported Language List

ProcedureTo Create the setServiceRevision.xml File

  1. Open a terminal window on the server where an instance of Access Manager is installed (if necessary).

  2. As superuser create a temporary directory to store the XML files used to add support for a new language.

    # mkdir -p /export/am_xml_tmp

  3. Change to the temporary created directory.

    # cd /export/am_xml_tmp/

  4. Create the setServiceRevision.xml file.

  5. Open the empty created file with a text editor and insert the following lines:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE Requests PUBLIC "-//iPlanet//Sun Java System Access Manager 7.1 Admin CLI DTD//EN" "jar://com/iplanet/am/admin/cli/amAdmin.dtd">

    <!-- apply this file by: amadmin -u admin-user -w admin-pwd -t filename.xml -->

    <Requests>

    <SchemaRootNodeRequests serviceName="iPlanetG11NSettings">

    <SetServiceRevisionNumber number="10" />

    </SchemaRootNodeRequests>

    </Requests>

  6. Save the changes.

ProcedureTo Apply Changes to the Access Manager Administration Console With the amadmin Tool

  1. Change to the Access Manager bin directory.

    # cd AM_BIN/

  2. Run the amadmin tool as follows:

    # ./amadmin -u admin-user -w admin-pwd -t \ /export/am_xml/tmp/setServiceRevision.xml

ProcedureTo Create the amG11nSettings_mod.xml File

  1. Open a terminal window on the server where an instance of Access Manager is installed (if necessary).

  2. Change to the temporary created directory.

    # cd /export/am_xml_tmp/

  3. Create the amG11nSettings_mod.xml file.

  4. Open the empty created file with a text editor and insert the following lines:

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE Requests PUBLIC "-//iPlanet//Sun Java System Access Manager 7.1 Admin CLI DTD//EN" "jar://com/iplanet/am/admin/cli/amAdmin.dtd">

    <!-- apply this file by: amadmin -u admin-user -w admin-pwd -t filename.xml -->

    <Requests>

    <SchemaRequests serviceName="iPlanetG11NSettings" SchemaType="Global">

    <AddDefaultValues>

    <AttributeValuePair>

    <Attribute name="sun-identity-g11n-settings-locale-charset-mapping"/>

    <Value>nl|charset=UTF-8</Value>

    </AttributeValuePair>

    </AddDefaultValues>

    </SchemaRequests>

    </Requests>

  5. Save the changes.

ProcedureTo Apply Changes to the Access Manager Administration Console With the amadmin Tool

  1. Change to the Access Manager bin directory.

    # cd AM_BIN/

  2. Run the amadmin tool as follows:

    # ./amadmin -u admin-user -w admin-pwd -t \ /export/am_xml/tmp/amG11nSettings_mod.xml

Adding Localization Resources for a Newly Supported Language

The following information pertains to the example procedures in this section:

ProcedureTo Prepare the Directory Structure

  1. Open a terminal window on the server where an instance of Access Manager is installed (if necessary).

  2. As superuser change to the authentication interface templates base directory.

    # cd AM_INS/web-src/services/config/auth

  3. Create a directory for the top-level organization.

    # mkdir -p example

  4. Copy the contents of the default directory to a new directory for the bookshop sub-realm.

    # cp -rp default example/bookshop

  5. Create a directory to contain the Dutch localization of the bookshop sub-realm.

    # mkdir -p example_nl/bookshop

  6. Copy the default authentication interface templates for the bookshop sub-realm to this new directory.

    # cp -rp example/bookshop/* example_nl/bookshop

ProcedureTo Add Localizing Authentication Interface Files

  1. Change to the created localization directory.

    # cd example_nl/bookshop

  2. Open the Login.jsp file in a text editor.

  3. Navigate to the line that contains this string:

    <body class="LogBdy" onload="placeCursor...>

  4. Below this line, insert the following single line:

    <h5><span style="color: rgb(255,255,255);">Welcome to a Dutch Bookshop organization.</span><br></h5>

  5. Save the changes.

  6. Open the Logout.jsp file in a text editor.

  7. Navigate to the line that contains this string:

    <body class="LogBdy">

  8. Below this line, insert the following single line:

    <h5><span style="color: rgb(255,255,255);">Thank you for visiting our Dutch Bookshop organization.</span><br></h5>

  9. Saves the changes.

  10. Open the LDAP.xml file in a text editor.

  11. Navigate to the line that contains this string:

    <Callbacks length="2" order="1" timeout="120" header="This server uses LDAP Authentication" >

  12. Replace this line with the following single line:

    <Callbacks length="2" order="1" timeout="120" header="This Dutch server uses LDAP Authentication" >

  13. Save the changes.

Applying and Testing Changes

ProcedureTo Redeploy an Access Manager Instance

  1. Open a terminal window on the server where an instance of Access Manager is installed (if necessary).

  2. As superuser change to the Access Manager bin directory.

    # cd AM_BIN/

  3. Copy the amsamplesilent file to a new file titled amsilentredeploy.

  4. Open the amsilentredeploy file in a text editor.

  5. Customize the amsilentredeploy file with the environment details where the Access Manager instance is deployed.

  6. Save the changes to the new amsilentredeploy file.

  7. Run the amconfig tool.

    # ./amconfig -s ./amsilentredeploy

  8. Restart the web container in which the Access Manager instance is currently deployed.

ProcedureTo Test Localizations

  1. Open a browser window (if necessary).

  2. Set the browser language setting to Dutch (nl).

  3. Go to http://host.domain/amserver/UI/Login?org=bookshop.

    A customized Access Manager Administration Console Login page appears.

Generating an MO File in UTF-8 Encoding

This section is not directly related to Access Manager. However, you should perform the following procedures when customizing the Access Manager CLI with a new language.

An MO file is commonly generated with a PO file. Hence, create a PO file and then generate the MO file.

ProcedureTo Create a PO File

  1. Open a terminal window (if necessary).

  2. As superuser create a temporary directory.

    # mkdir /export/am_mo_gen

  3. Change to the created directory.

    # cd /export/am_mo_gen

  4. Create an example.po file.

  5. Open the empty example.po file in a text editor.

  6. Add the following content to the file:

    domain "example"

    msgid "This is an example how to generate a Machine Object file in UTF-8 encoding"

    msgstr "Cet example démontre comment générer un fichier Machine Object encodé avec UTF-8"

  7. Add the charset specification to the bottom of the file, as follows:

    “Content-Type: text/plain; charset=UTF-8\n”

  8. Save the changes.

ProcedureTo Generate an MO File From the Created PO File

  1. Open a terminal window (if necessary).

  2. Go to the directory where a PO file is stored, /export/am_mo_gen in this procedure.

    # cd /export/am_mo_gen

  3. Generate the MO file by using the msgfmt tool.

    # msgfmt -g -o example.mo example.po