aspose file tools*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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.
 
 
subject: Language/locale from Accept-Language header