struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksandr Mashchenko (JIRA)" <>
Subject [jira] [Commented] (WW-4929) Fallback i18n Locale
Date Wed, 04 Apr 2018 17:22:00 GMT


Aleksandr Mashchenko commented on WW-4929:

I don't think Struts uses "Accept-language" right now. You can create custom interceptor for

> Fallback i18n Locale
> --------------------
>                 Key: WW-4929
>                 URL:
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Interceptors
>    Affects Versions:
>            Reporter: Kai Denzel
>            Priority: Major
>             Fix For: 2.6
> What i noticed is, when i set the perfered languages in my browser for example in this
> 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

View raw message