Technical Note: Sun Java System Access Manager Localization Guide

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