Previous Contents Index Next
Sun ONE Web Server 6.1 Administrator's Guide

> ## Appendix D
> Support for Internationalization and Localization

> The internationalized and localized version of the Sun ONE Web Server 6.1 provides support for multiple languages and multiple encodings.

> The main features are described in this appendix:

> - Entering Multibyte Data
> - Support for Multiple Character Encodings
> - Language Preferences
> - Configuring the Server to Serve Localized Content

> ##

> Entering Multibyte Data

> If you want to enter multibyte data on the Server Manager or the Administration Server 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 multibyte characters.

> ### LDAP Users and Groups

> For email addresses, use only those characters permitted in RFC 1700 (ftp://ds.internic.net/rfc/rfc1700.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 (such as Netscape Communicator) to input 8-bit or multibyte data.

> ##

> Support for Multiple Character Encodings

> Sun ONE Web Server 6.1 provides multiple character encoding support for the following features:

> - WebDAV
> - Search

> ### WebDAV

> Sun ONE Web Server 6.1 supports setting and retrieving multibyte 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 ONE Web Server 6.1 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 metatags 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 ONE Web Server 6.1 Programmer’s Guide to Web Applications. For more information, see "Customizing the Search Query Page".

> ##

> Language Preferences

> You can set the Default Language for your server which is used for all the end user error messages using the Magnus Editor from the server preferences. The localized version of Sun ONE Web Server 6.1 supports seven languages:

> - en (English)
> - fr (French)
> - de (German)
> - ja (Japanese)
> - ko (Korean)
> - zh (Simplified Chinese)
> - zh_TW (Traditional Chinese)

> The end-user search interface in a localized version of the Sun ONE Web Server 6.1 is completely localized.

> Note | This setting has no effect on a non-localized version of the web server.

> ##

> 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 turning the acceptlanguage setting on for the VS class in the Edit Classes menu of the Administration Server. This also ensures that all end user error messages are also based on the Accept-language header.

> For example, if acceptlanguage is set to on, 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:

> 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 | 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.

> Previous Contents Index Next

> Copyright 2004 Sun Microsystems, Inc. All rights reserved.