[
http://www.stripesframework.org/jira/browse/STS-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11596#action_11596
]
Frederic Daoud commented on STS-619:
------------------------------------
Jan,
Have you reproduced this problem? I ask because from looking at the code, it
seems that the behavior is already what you suggest - that the first locale in
the configured preference list is used if no match is found, regardless of
whether or not there were accepted locales in the request. The only time the
system's default locale is used is if you did not configure any locales with
the LocalePicker.Locales configuration parameter.
Of course, I could be wrong, so please let me know if you reproduce this
problem. Thanks.
> 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
> Fix For: Release 1.5.1, Release 1.6
>
>
> 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
------------------------------------------------------------------------------
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development