You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/22 09:22:00 UTC

[jira] [Work logged] (WW-4929) Fallback i18n Locale

     [ https://issues.apache.org/jira/browse/WW-4929?focusedWorklogId=515230&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-515230 ]

ASF GitHub Bot logged work on WW-4929:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Nov/20 09:21
            Start Date: 22/Nov/20 09:21
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request #451:
URL: https://github.com/apache/struts/pull/451


   This PR adds a new handler to support `Accept-Language` header when selecting `Locale`. `I18Interceptor` must be configured with a set of supported locale to properly filter out user's `Locale`.
   
   If this PR will be accepted I will update docs.
   
   Implements [WW-4929](https://issues.apache.org/jira/browse/WW-4929)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Issue Time Tracking
-------------------

            Worklog Id:     (was: 515230)
    Remaining Estimate: 0h
            Time Spent: 10m

> Fallback i18n Locale
> --------------------
>
>                 Key: WW-4929
>                 URL: https://issues.apache.org/jira/browse/WW-4929
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>    Affects Versions: 2.5.14.1
>            Reporter: Kai Denzel
>            Priority: Major
>             Fix For: 2.6
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> What i noticed is, when i set the perfered languages in my browser for example in this order:
> fr - francais
> de - german
> en - english
> The framework will set the ActionContext.getLocale() to fr. Then the framework will look for resources for francais, and if this locale resources do not exist, the framework will look for the system locale. If the system locale in this example is en, the german resources will be overlooked.
> I mean the HTTP-Header "Accept-language" has an Array of locales. So why not fallback to the next selected if the first Locale does not exist? 
> Is it possible, to make the framework ready for fallback?
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)