Hi,

The "standard" HTTP-way is to lookup for an "Accept-Language" header
within HttpRequest. That works with newer browsers like Netscape 4.
They allow their users to specify an preffered list of languages,
not only one language, without depending on "where" the browser is located.
Smart servers (and servlets) may lookup for that header and return content
acordingly.

The content of the "Accept-Language" header is a comma-separated list
of languages like here:

Accept-Language: fr-CA,de-AT

wich should be interpreted as "I prefer to see Canadian French, or, if not
available, Austrian German"

If you want to instantiate an specific Locale, you dont need to
maintain a map - just lowercase the header, replace dashes '-' with
underscores '_',  StringTokenize it using commas as sepparators, and you
will be able to respond with language-specific  content.

Cose this is a little expensive, some will find usefull to keep the obtained
localised instances within HttpSession, to avoid the previous coding for
each request.

I work at a server wich goes further, automagically
replies with language-dependendent templates,
and I'll gladly supply more information on it, to whom is interested.

Thanks,

Cezar Totth                             email:  [EMAIL PROTECTED]
Genesys Software Romania
http://JApS.Genesys.ro

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to