You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2014/08/27 18:49:58 UTC

[jira] [Commented] (TAP5-2346) use servletRequest.getLocales() rather than getLocale() to support "second choice" language options

    [ https://issues.apache.org/jira/browse/TAP5-2346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14112425#comment-14112425 ] 

Howard M. Lewis Ship commented on TAP5-2346:
--------------------------------------------

Boy, this is going to make the selection logic complex!  Perhaps it should be: find an *exact* match from request.getLocales() against the allowed locales and if that is not found ... how to define "best match"?

> use servletRequest.getLocales() rather than getLocale() to support "second choice" language options
> ---------------------------------------------------------------------------------------------------
>
>                 Key: TAP5-2346
>                 URL: https://issues.apache.org/jira/browse/TAP5-2346
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>            Reporter: Robert Hailey
>            Priority: Minor
>              Labels: localization
>
> At the moment, Tapestry only considers a request's first locale choice, falling back to the default. It would be better, methinks, to iterate over the available choices (selecting the first supported) before falling back to the default.
> Note that it is still appropriate for Tapestry's Request object to have only getLocale(), as it will be the best fit from the request.getLocales().
> http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/T5-3-Localization-is-only-partially-implemented-td5726903.html
> http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#getLocales%28%29



--
This message was sent by Atlassian JIRA
(v6.2#6252)