Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 6.4
-
Fix Version/s: None
-
Component/s: Localization, Old Core
-
Labels:None
-
Difficulty:Unknown
-
Similar issues:
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
-
- Open
-