This site uses cookies. By continuing to browse the site, you agree to our use of cookies. Find out more about cookies.
Skip to main content
Metadecidim's official logo
  • English Triar la llengua Elegir el idioma Choose language
    • Català
    • Castellano
Sign Up Sign In
  • Home
  • Processes
  • Assemblies
  • Initiatives
  • Consultations
  • Conferences
  • Help

Report a Bug

#BugReportDecidim Let's test Decidim and report bugs together

  • The process
  • I found a Bug!
chevron-left Back to list

Detected language does not work as expected

Avatar: Ivan Vergés Ivan Vergés verified-badge
17/07/2019 12:17  
Accepted

The default language detected by Decidim does not always work as expected and does not respect organization defaults.

Currently, it tries to detect the user's default language from the browser's Accept-Language header. But that only works if this header is 2 chars long (ie: 'ca' will be detected, 'ca-ES' won't be detected). Full header are usually like 'es,en-US;q=0.8,ca;q=0.5,en;q=0.3'.

Also, when the language is not detected (or does not exists in Decidim) fallback to the default language configured in the application code and ignores the default language from the organization.

This is the PR that solves this:
https://github.com/decidim/decidim/pull/5272

  • Filter results for category: 0.18.x 0.18.x

This proposal has been accepted because:

This incidence has been solved. Closed via #5272. 

Thank you for contributing!

List of Endorsements

Avatar: Pau Parals Pau Parals verified-badge
Endorsements count1
Detected language does not work as expected Comments 1

Reference: MDC-PROP-2019-07-14706
Version number 1 (of 1) see other versions
Check fingerprint

Fingerprint

The piece of text below is a shortened, hashed representation of this content. It's useful to ensure the content hasn't been tampered with, as a single modification would result in a totally different value.

Value: 88cd893517c925b243eb6b624c54e03d18a256de56a992ae7765f0f589878f34

Source: {"body":{"en":"The default language detected by Decidim does not always work as expected and does not respect organization defaults.\r\n\r\nCurrently, it tries to detect the user's default language from the browser's Accept-Language header. But that only works if this header is 2 chars long (ie: 'ca' will be detected, 'ca-ES' won't be detected). Full header are usually like 'es,en-US;q=0.8,ca;q=0.5,en;q=0.3'.\r\n\r\nAlso, when the language is not detected (or does not exists in Decidim) fallback to the default language configured in the application code and ignores the default language from the organization.\r\n\r\nThis is the PR that solves this:\r\nhttps://github.com/decidim/decidim/pull/5272"},"title":{"en":"Detected language does not work as expected"}}

This fingerprint is calculated using a SHA256 hashing algorithm. In order to replicate it yourself, you can use an MD5 calculator online and copy-paste the source data.

Share:

link-intact Share link

Share link:

Please paste this code in your page:

<script src="https://meta.decidim.org/processes/bug-report/f/210/proposals/14706/embed.js"></script>
<noscript><iframe src="https://meta.decidim.org/processes/bug-report/f/210/proposals/14706/embed.html" frameborder="0" scrolling="vertical"></iframe></noscript>

Report inappropriate content

Is this content inappropriate?

Reason

1 comment

Order by:
  • Older
    • Best rated
    • Recent
    • Older
    • Most discussed
Avatar: Ivan Vergés Ivan Vergés verified-badge
25/07/2019 17:31
  • Get link Get link

This is merged (fixed).

Add your comment

Sign in with your account or sign up to add your comment.

Loading comments ...

  • Terms and conditions of use
  • About the community
  • Download Open Data files
  • Metadecidim at Twitter Twitter
  • Metadecidim at Instagram Instagram
  • Metadecidim at YouTube YouTube
  • Metadecidim at GitHub GitHub
Creative Commons License Website made with free software.
Decidim Logo

Confirm

OK Cancel

Please sign in

decidim Sign in with Decidim
Or

Sign up

Forgot your password?