This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Servlets and the fly likes Browser Locale Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Browser Locale" Watch "Browser Locale" New topic
Author

Browser Locale

June
Greenhorn

Joined: Aug 16, 2001
Posts: 24
Does anyone know how to get the Locale of a web browser?
Thanks!

JQ
Manjunath Subramanian
Ranch Hand

Joined: Jul 18, 2001
Posts: 236

Try the getLocales() method declared in the ServletRequest interface and defined in the HttpServletRequest class.This method returns a Enumeration of all the attributes.
Hope this helps,
Manjunath
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Browser Locale
 
Similar Threads
fmt: tag
Struts Internationalization Issue with Arabic
Servlet headers
How to set the locale in JSR 168 API portlet?(using wps 6.1)
how to get client country name?