my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Language/locale from Accept-Language header
 
Similar Threads
Advanced question (I think)
how to get client country name?
get locale
i18n
Some (not all!) UTF8 Characters render as "?" only from UNIX server -- works perfectly local (Win)..