wood burning stoves 2.0*
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.
 
GeeCON Prague 2014
 
subject: Language/locale from Accept-Language header