The procedures in the following sections provide a practical summary of all procedures discussed in this document:
Adding a new language to the supported language list
Adding localization resources for a newly supported language
Applying and testing changes
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.
Open a terminal window on the server where an instance of Access Manager is installed (if necessary).
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
Change to the temporary created directory.
# cd /export/am_xml_tmp/
Create the setServiceRevision.xml file.
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>
Save the changes.
Change to the Access Manager bin directory.
# cd AM_BIN/
Run the amadmin tool as follows:
# ./amadmin -u admin-user -w admin-pwd -t \ /export/am_xml/tmp/setServiceRevision.xml
Open a terminal window on the server where an instance of Access Manager is installed (if necessary).
Change to the temporary created directory.
# cd /export/am_xml_tmp/
Create the amG11nSettings_mod.xml file.
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>
Save the changes.
Change to the Access Manager bin directory.
# cd AM_BIN/
Run the amadmin tool as follows:
# ./amadmin -u admin-user -w admin-pwd -t \ /export/am_xml/tmp/amG11nSettings_mod.xml
The following information pertains to the example procedures in this section:
A default top-level organization called example exists.
The default top-level organization example has a sub-realm called bookshop. The sub-realm bookshop has been created through the Access Manager Administration Console.
The L10n resources for the Dutch (nl) language are added to sub-realm bookshop by doing the following:
Localizing the Login.jsp file
Localizing the Logout.jsp file
Localizing the LDAP.xml file
The changes are applied by doing the following:
Redeploying the customized Access Manager instance
Restarting the web container where Access Manager is deployed
Open a terminal window on the server where an instance of Access Manager is installed (if necessary).
As superuser change to the authentication interface templates base directory.
# cd AM_INS/web-src/services/config/auth
Create a directory for the top-level organization.
# mkdir -p example
Copy the contents of the default directory to a new directory for the bookshop sub-realm.
# cp -rp default example/bookshop
Create a directory to contain the Dutch localization of the bookshop sub-realm.
# mkdir -p example_nl/bookshop
Copy the default authentication interface templates for the bookshop sub-realm to this new directory.
# cp -rp example/bookshop/* example_nl/bookshop
Change to the created localization directory.
# cd example_nl/bookshop
Open the Login.jsp file in a text editor.
Navigate to the line that contains this string:
<body class="LogBdy" onload="placeCursor...>
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>
Save the changes.
Open the Logout.jsp file in a text editor.
Navigate to the line that contains this string:
<body class="LogBdy">
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>
Saves the changes.
Open the LDAP.xml file in a text editor.
Navigate to the line that contains this string:
<Callbacks length="2" order="1" timeout="120" header="This server uses LDAP Authentication" >
Replace this line with the following single line:
<Callbacks length="2" order="1" timeout="120" header="This Dutch server uses LDAP Authentication" >
Save the changes.
Open a terminal window on the server where an instance of Access Manager is installed (if necessary).
As superuser change to the Access Manager bin directory.
# cd AM_BIN/
Copy the amsamplesilent file to a new file titled amsilentredeploy.
Open the amsilentredeploy file in a text editor.
Customize the amsilentredeploy file with the environment details where the Access Manager instance is deployed.
Save the changes to the new amsilentredeploy file.
Run the amconfig tool.
# ./amconfig -s ./amsilentredeploy
Restart the web container in which the Access Manager instance is currently deployed.
Open a browser window (if necessary).
Set the browser language setting to Dutch (nl).
Go to http://host.domain/amserver/UI/Login?org=bookshop.
A customized Access Manager Administration Console Login page appears.
MO
File
in UTF-8 EncodingThis 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.
Open a terminal window (if necessary).
As superuser create a temporary directory.
# mkdir /export/am_mo_gen
Change to the created directory.
# cd /export/am_mo_gen
Create an example.po file.
Open the empty example.po file in a text editor.
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"
Add the charset specification to the bottom of the file, as follows:
“Content-Type: text/plain; charset=UTF-8\n”
Save the changes.