The language chooser drop down should honor Accept-Language

Bug #914019 reported by François Marier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Doris Tam

Bug Description

Browsers send an Accept-Language header in every HTTP request based on the user's language preferences.

When more than one language is installed in Mahara, we display a language chooser.

We should default to the first language listed in Accept-Language (ignoring languages listed there for which no langpack is installed).

Revision history for this message
François Marier (fmarier) wrote :

This was inspired by this forum thread:

  http://mahara.org/interaction/forum/topic.php?id=4290

tags: added: translations
removed: i18n
tags: added: academy bite-sized
Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
Doris Tam (doristam)
Changed in mahara:
assignee: Doris Tam (doristam) → nobody
Doris Tam (doristam)
Changed in mahara:
assignee: nobody → Doris Tam (doristam)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11498

Doris Tam (doristam)
Changed in mahara:
status: Triaged → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11498
Committed: https://git.mahara.org/mahara/mahara/commit/b53830efebfc4a1f06307e308daaae4a8714a1b5
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit b53830efebfc4a1f06307e308daaae4a8714a1b5
Author: Doris Tam <email address hidden>
Date: Tue Dec 8 10:30:46 2020 +1300

Bug 914019: Default to the first language listed in Accept-Language for lang dropdown

Set the default language when no preferences have been set to the first language
in the request header Accept-Language where there is a lang pack installed,
otherwise default to en.utf8.

Default string only appears when the current language is not the Accept-Language

Added a method to match lang packs to Accept-Language list

Change-Id: I7ed02c5be10ede0967861cba353bd0fc4ccb650e

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 21.04.2
milestone: 21.04.2 → 21.10.0
tags: added: newfeature
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.