This chapter describes gateway localization and identifies the tasks required to set up additional gateway locales. Topics include:
Unicode and Netscape Support for UTF-8
How the Gateway Selects a Character Set
Special Characters
Gateway Locales
Setting Up Locales for Translation
character set defined in the client's HTTP Accept-charset header (in release 4.0, this can be overridden for a particular browser using the ignoreAcceptCharsetFrom parameter).
character set defined in the client's HTTP Accept-language header (for instance, for Japanese, the character set would be defined as ../dsgw/ja/dsgwcharset.conf)
character set defined in the gateway's .conf file by the charset parameter.
When a client includes more than one character set in a request header, and the gateway supports more than one of these, it selects a character set according to this priority:
UTF-8
of the possible character sets, the character set with the highest Q value (for example, "de;q=1, en;q=0.5, fr;q=0.7" would give German the highest Q value)
the character set that appears first in the request header.
Latin-1 (ISO-8859-1)
Browsers designed for localization are configured to request the UTF-8 character set by default. To support localization, the gateway is preconfigured to transmit the UTF-8 character set to these clients: Netscape Communicator version 4.0 and greater and to Internet Explorer version 4.0 and greater. Release 4.0 of the gateway allows this preconfiguration to be overridden using the ignoreAcceptCharsetFrom parameter.
"ignoreAccetpCharsetFrom" on page 85 The conversion from UTF-8 to the Gateway client's chosen character set is performed shortly before output.
For browsers that do not request UTF-8 by default (including Netscape Navigator 3.x and pre-4.0 releases of Internet Explorer), the Gateway selects a character set from the Accept-Charset request header or from the Accept-Language request header, depending on the HTTP client.
Shift_JIS
Big5
EUC-KR
If the client's character set lacks a character for non-breaking space, but has ideographic space, non-breaking spaces are converted to ideographic spaces before character set conversion.
When the Gateway needs to embed a UTF-8 string in an URL, it encodes it in a query string (the query string is the part of the URL that follows the question mark).
Japanese
German
French
A single Gateway instance supports clients in multiple locales concurrently.
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 Creating a locale for Chinese (zh) translation
Create a "zh" directory in NS-HOME/dsgw/context
Copy dsgw.conf to the NS-HOME/dsgw/context/zh
uncomment this line from the Gateway's .conf file: include "../config/dsgw-l10n.conf"
include "../config/dsgw-l10n.conf"
create a "zh" directory in NS-HOME/dsgw/config
Copy or create the file dsgw-l10n.conf, stored during Gateway installation in NS-HOME/dsgw/config/<lang>, to NS_HOME/dsgw/config/zh