Red Hat Version4.1 Manual Do Utilizador

Página de 156
Chapter 3, Gateway Localization 35
Setting Up Locales for Translation
Support for multiple locales is accomplished by translating documentation 
(including online help), the string resource database, and the configuration and 
HTML template files. A single copy of the compiled code handles all supported 
locales.
Locale-dependent information is stored in translated files stored in 
subdirectories identifying the locale name. These editable files are stored 
separately from the Gateway code. For example, the German translation of 
config/search.html is stored in config/de/search.html, the French translation is 
stored in config/fr/search.html, and the Japanese translation is stored in config/
ja/search.html. 
Setting Up Locales for Translation
The default gateway can be configured to support locales in addition to English 
(the default locale), French, German, and Japanese. This is part of the overall 
localization effort, which includes localizing all the configuration and HTML 
files, including the online help and the string resource database.This is made 
possible by including a pointer to the mapping table in dsgw-l10n.conf, which 
is stored during Directory server installation in NS-HOME/dsgw/config/<lang>.
dsgw-l10n.conf
dsgw-l10n.conf provides translation in the Search and Advanced Search pull-
down menus for the default Gateway (dsgw.conf). If dsgw-110n.conf is not 
present in the /config/<lang> directory, translation of the UI does not occur and 
English characters appear in the pull-down menus for Standard Search and 
Advanced Search.
Example 3.1 shows how to create a new locale using Chinese as the language 
for translation.
Example 3.1 Creating a locale for Chinese (zh) translation
1.
Create a “zh” directory in NS-HOME/dsgw/context
2.
Copy dsgw.conf to the NS-HOME/dsgw/context/zh
3.
uncomment this line from the Gateway’s .conf file: