The LANG
environment variable must be set for the desktop to use the operating system's language-sensitive routines. The desktop supports:
Western Europe, Latin-based languages
Japanese
Traditional Chinese
Simplified Chinese
Korean
Support for other languages may have been added by your desktop vendor.
You can set LANG
to any value supported by the operating system. The Options menu in the login screen displays the list of supported languages and territories.
There are four ways to set LANG
for the desktop:
By editing a resource in the Xconfig file
Using the Options menu in the login screen
By creating an executable sh or ksh Xsession.d script. (See "Sourcing Xsession.d Scripts" for more information about using an Xsession.d script.)
By editing the user's .dtprofile file
When LANG
is set, the desktop uses the following language-dependent files to determine the localized interface.
Colors--/usr/dt/palettes/desc.language
Backdrops--/usr/dt/backdrops/desc.language
If you set the language by means of an Xconfig file, the login screen is localized and LANG
is set for all users. This is the only way to change LANG
for all displays in multi-display systems.
(To modify Xconfig, copy /usr/dt/config/Xconfig to /etc/dt/config/Xconfig.)
The language is set by placing the following line in /etc/dt/config/Xconfig:
dtlogin.host_display.language: language
For example, the following line sets LANG
to Swedish_locale on display my_host:0.
dtlogin.my_host_0.language: Swedish_locale
The dtlogin client reads the appropriate message catalog for that language and brings up the localized login screen. The dtlogin client then determines the list of locales using the following resources in the /etc/dt/config/Xresources resource file:
dtlogin*language
dtlogin*languageList
dtlogin*languageName
The Xconfig file may need to set the NLSPATH
environment variable appropriately for the chosen language. If this is not the case, or if you want to set NLSPATH
yourself, see "NLSPATH Environment Variable".
To set the language for one session, use the login screen Options menu. The login screen is localized and LANG
is set for the user. LANG
returns to its default value (set in dtlogin) at the
conclusion of the session.
A user can override the login's LANG
setting within the HomeDirectory/.dtprofile file. The login screen is not localized, and LANG
is set for the user.
If you use sh or ksh:
LANG=language export LANG
If you use csh:
setenv LANG language
The LANG
environment variable changes the directory name that is searched for your session configuration files.
The localized session configuration files are:
/usr/dt/config/language/Xresources (Login Manager resource file)
/usr/dt/config/language/sys.font (Session Manager resource file)
/usr/dt/config/language/sys.resources (Session Manager resource file)
/usr/dt/config/language/sys.session (Session Manager executable shell)
/usr/dt/config/language/sys.dtwmrc (Window Manager resource file)
/usr/dt/appconfig/types/language/dtwm.fp (Window Manager Front Panel)
Besides LANG
, there are other NLS environment variables such as LC_CTYPE
and LC_ALL
. These variables are not affected by the dtlogin language resource
nor by the login screen Options menu. They must be set in the following files:
System-wide variables: /etc/dt/config/Xsession.d
Personal variables: HomeDirectory/.dtprofile
The NLSPATH
environment variable determines the directory paths that applications search for message catalogs. Both LANG
and NLSPATH
must be set to use those message
catalogs. Refer to "Localizing Message Catalogs" for the location of localized messages. Most desktop clients will prefix the path to NLSPATH
upon startup.