Common Desktop Environment: Internationalization Programmer's Guide

Setting the Environment

For a locale-sensitive application, set the UID file to the appropriate directory. Set the UIDPATH or XAPPLRESDIR environment variable to the appropriate value.

For example, to run the uil_sample program with an English environment (LANG environment variable is en_US), set uil_sample.uid with Latin characters at the $HOME/en_US directory, or set uil_sample.uid to a directory and set the UIDPATH environment variable to the full path name of the uil_sample.uid file.

To run the uil_sample program with a Japanese environment (LANG environment variable is ja_JP), create a uil_sample.uid file with Japanese (multibyte) characters at the $HOME/ja_JP directory, or place uil_sample.uid to a unique directory and set the UIDPATH environment variable to the full path name of the uil_sample.uid file. The following list specifies the possible variables:

%U

Specifies the UID file string.

%N

Specifies the class name of the application.

%L

Specifies the value of the xnlLanguage resource or LC_CTYPE category.

%l

Specifies the language component of the xnlLanguage resource or the LC_CTYPE category.

If the XAPPLRESDIR environment variable is set, the MrmOpenHierarchy() function searches the UID file in the following order: