This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Struts and the fly likes Language/locale from Accept-Language header Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Language/locale from Accept-Language header" Watch "Language/locale from Accept-Language header" New topic
Author

Language/locale from Accept-Language header

Rick DeBay
Ranch Hand

Joined: Jul 11, 2003
Posts: 70
Given the header: Accept-Language: da, en-gb;q=0.8, en;q=0.7
and message files for en_US and es_US, what locale will struts automagically set for the user?
Rick DeBay
Ranch Hand

Joined: Jul 11, 2003
Posts: 70
Given the rules for ResourceBundles, the resource used should be SomeResource_en. I would hope that the Locale set would be en_GB, and not da or the default.
 
Have you checked out Aspose?
 
subject: Language/locale from Accept-Language header
 
It's not a secret anymore!