DefaultLocalePicker - default locale selection
----------------------------------------------

                 Key: STS-619
                 URL: http://www.stripesframework.org/jira/browse/STS-619
             Project: Stripes
          Issue Type: Bug
    Affects Versions: Release 1.5
            Reporter: Jan Moravec
            Priority: Minor


Hello,

I have just bumped into a case when I have two configured 
(LocalePicker.Locales) locales: cs_CZ, sk_SK and Stripe's DefaultLocalePicker 
engaged in web.xml.

All is sweet, but the only gotcha is when the browser does NOT send the 
accept-language header (probably quite rare, but can happen). In this case the 
DLP returns the system's default locale. 

Although this might be a documented behavior, would not it actually make much 
more sence (because it is more intuitive) to return the first locale in the 
LocalePicker.Locales preference list? The reasoning is, "what is more important 
- a rather uncertain system locale, or a locale that is explicitly specified in 
the configuration"?

The interesting thing is that when the accept-language header IS provided and 
there is no match between accept-language locales and LocalePicker.Locales 
locales, then DLP picks the first locale in the LocalePicker.Locales list. This 
is IMO inconsistent because no "accept-language locales" and "no matching 
accept-language locales" should be treated identically.

Thanks,
Jan

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://www.stripesframework.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to