Feature request: Institution-specific default languages
Bug #1266320 reported by
Aaron Wells
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
Wishlist
|
Aaron Wells |
Bug Description
This feature would allow an institution to specify the default language for its users.
Changed in mahara: | |
importance: | Undecided → Wishlist |
assignee: | nobody → Aaron Wells (u-aaronw) |
milestone: | none → 1.9.0 |
status: | New → In Progress |
tags: | added: institutions languages |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → In Progress |
tags: | added: nominatedfeature |
Changed in mahara: | |
status: | In Progress → Fix Committed |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
It sounds simple enough, but it turns out there are some weird corner cases, the most obvious of which is if a user belongs to multiple institutions that specify languages. Here is how I have implemented it, which I think is the most straightforward way:
1. The institution's language setting doesn't show up unless there are at least two languages installed in the site (the same as the user's language setting)
2. Each institution can set a language for their users, or they can leave it on "site default".
3. If a user belongs to multiple institutions that specify a language, then we arbitrarily use the language from the "first" institution. This is an okay solution because the language is *only* a default. If the user ever chooses a specific language, either via their account settings or the pre-login language menu, existing code ensures that will override the default henceforth.
4. The existing system is that the user's language account preference can be a specific language, or it can be the string "default" (or NULL), in which case you use the site default. This remains true, except now, if you choose "default" we use your institution default if you have one, and otherwise we use the site default.
5. In the user language menu, if your default is an institution language then we say "<institution display name> (English)" instead of "Site default (English)".
The wonky things about this are: 1) arbitrarily picking one language if you belong to multiple institutions that specify languages; 2) if you switch between institutions with different selected languages, your displayed language will change even though you didn't manually change it (but that's kind of the point); 3) if you switch institutions with different languages, the value you see selected in the user language menu will be different even though you didn't change it, i.e. it can change from "UNR (English)" to "Site default (English)". But I believe those are acceptable design compromises that won't cause too much user confusion.