[ 
http://www.stripesframework.org/jira/browse/STS-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11222#action_11222
 ] 

Qian Qiao commented on STS-501:
-------------------------------

Tim,

Yeah, I misinterpret the question initially, however I think the 
DefaultLocalePicker is doing the right thing.

In Karel's case:

Locale provided by browser, and hence request: cs, en_US
Locale provided by application, cs_CZ, en_US

It would be strange if the DefaultLocalePicker decides the best locale for this 
request is cs_CZ, wouldn't it?

To put it in a more real life, so to speak, situation:
The user poses himself as someone who speaks both Czech and English, and lives 
in the US.
The application designer says: I have messages designed specifically for Czech 
speaking people *who lives in the Czech Republic*, and for English speaking 
people living in the States,

It seems to me that showing en_US (which is the behaviour of 
DefaultLocalePicker) is the more logical solution.

For generic Czech messages, the application should simply provide a cs locale, 
which is what Karel found out.

> DefaultLocalePicker behavior - is it right to always prefer a two-way locale 
> match ?
> ------------------------------------------------------------------------------------
>
>                 Key: STS-501
>                 URL: http://www.stripesframework.org/jira/browse/STS-501
>             Project: Stripes
>          Issue Type: Improvement
>            Reporter: Karel Kolman
>            Priority: Minor
>
> The way DefaultLocalePicker chooses the locale to use does not seem right to 
> me. It always preferres a two-way match (language + country), language match 
> corresponding to language priorities in the request allowed locales should be 
> a priority.
> Example:
> I have a Firefox installation with czech locale, the locales it sends in 
> default settings with web requests are "cs", "en_US".
> Let's say I have LocalePicker.Locales value set to "cs_CZ:UTF-8,en_US:UTF-8", 
> the web pages are rendered to me in english.
> (I can "fix" this by setting LocalePicker.Locales 
> "cs:UTF-8,cs_CZ:UTF-8,en_US:UTF-8")

-- 
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: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to