Sun Java System Web Server 7.0 Update 3 Administrator's Guide

Chapter 14 Internationalization and Localization

The internationalized and localized version of the Sun Java System Web Server provides support for multiple languages and multiple encodings.

Entering Multi-byte Data

If you want to enter multi-byte data on the administration console pages, you need to be aware of the following issues:

File or Directory Names

If a file or directory name is to appear in a URL, it cannot contain 8 bit or multi-byte characters.

LDAP Users and Groups

For email addresses, use only those characters permitted in RFC 17.000 (ftp://ds.internic.net/rfc/rfc17.000.txt). User ID and password information must be stored in ASCII.

To make sure you enter characters in the correct format for users and groups, use a UTF-8 form-capable client to input 8 bit or multi-byte data.

Support for Multiple Character Encodings

Sun Java System Web Server 7.0 provides multiple character encoding support for the following features:

WebDAV

Sun Java System Web Server supports setting and retrieving multi-byte properties in the PROPPPATCH and PROPFIND methods. While request can be in any encoding format, the response from the server is always in UTF-8.

Search

Sun Java System Web Server 7.0 uses a Java-based search engine that supports full-text indexing and searching of documents in all character encodings that the underlying Java VM supports. The default encoding for the documents can be specified at the time of creating a search collection. For HTML documents, the indexer tries to deduce the encoding from the HTML meta tags and if it cannot, falls back to use the default encoding.

The search interface is based on JSP tag libraries and can be customized and localized in any language and encoding that you wish. The tag libraries are listed in the Sun Java System Web Server 7.0 Developer’s Guide to Web Applications.

Configuring the Server to Serve Localized Content

End users can configure their browsers to send an Accept-language header that describes their language preference for the content they are accessing. The server can be configured to serve content based on the Accept-language header by enabling the Negotiate Client Language checkbox under Configuration > (Select Configuration) > Virtual Server >(Select Virtual Server) > Server Setting > General > Localization.

For example, if this option is enabled, and a client sends the Accept-language header with the value fr-CH,de, when requesting the following URL:

http://www.someplace.com/somepage.html

Your server searches for the file in the following order:

ProcedureSearch Order

  1. The Accept-language list fr-CH,de.

    http://www.someplace.com/fr_ch/somepage.html

    http://www.someplace.com/somepage_fr_ch.html

    http://www.someplace.com/de/somepage.html

    http://www.someplace.com/somepage_de.html

  2. Language codes without the country codes (fr in the case of fr-CH):

    http://www.someplace.com/fr/somepage.html

    http://www.someplace.com/somepage_fr.html

  3. The DefaultLanguage, such as en, defined in the magnus.conf file.

    http://www.someplace.com/en/somepage.html

    http://www.someplace.com/somepage_en.html

  4. If none of these are found, the server tries:

    http://www.someplace.com/somepage.html


    Note –

    Keep in mind when naming your localized files that country codes like CH and TW are converted to lower case and dashes (-) are converted to underscores (_).



    Caution – Caution –

    Enabling the acceptlanguage setting has a performance penalty since the server has to check for content in every language specified in the Accept-language as per the algorithm illustrated above.