aspose file tools*
The moose likes Servlets and the fly likes Recognizing the Language preference of the user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Recognizing the Language preference of the user" Watch "Recognizing the Language preference of the user" New topic
Author

Recognizing the Language preference of the user

Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
Hi
I want to know the language preference of the client browser (cookies are enabled),and among the two options i.e. request attribute ACCEPT_LANGUAGE or cookies which one is better? Is the request one better as it won't be needed to persist them ? or any other way
Thanks
-Varun
[ December 18, 2002: Message edited by: varun Khanna ]

- Varun
Asher Tarnopolski
Ranch Hand

Joined: Jul 28, 2001
Posts: 260
to get a user accepted language you can use
request.getHeader("Accept-Language")
i didn't get your questions about cookies...


Asher Tarnopolski
SCJP,SCWCD
Varun Khanna
Ranch Hand

Joined: May 30, 2002
Posts: 1400
I came across cookie called cllang, though I don't know much about it.
-Varun
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Recognizing the Language preference of the user