Details
-
Bug
-
Resolution: Duplicate
-
Major
-
None
-
6.4
-
None
-
Unknown
-
Description
Follow this steps to reproduce:
- Create a new wiki page with this content:
{{velocity}} $services.localization.currentLocale {{/velocity}}
- Configure your browser to ask for Brazilian Portuguese language
- Logout
- Clear the existing cookies
- Access the wiki page created in the first step
You get 'pt' although we would expect 'pt_BR'.
You can check the HTTP headers of the request. I got:
pt-BR,en-US;q=0.7,en;q=0.3
so 'pt-BR' is included as first option.
The problem comes from XWiki.getAcceptedLanguages() which keeps only the language code (ignoring the country code).
Attachments
Issue Links
- duplicates
-
XWIKI-10083 Prefered language detection from browser setting does not take into account the country
- Closed