akeeba / panopticon

Self-hosted site monitoring and management

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language selection after logging in

nikosdion opened this issue · comments

Allow the user to change their language after logging in.

This may come in handy in two use cases.

Wrong language selected in the login page

You accidentally switch the login page's language, but still log in without a problem (e.g. a password manager automatically filled in the form for you and you pressed ENTER without noticing the language disparity). At this point you're having a pretty bad time, seeing the interface in a language you presumably don't speak, trying to figure out how to exit based on iconography alone – which is not an option for screen reader users, oops.

Shared accounts

Yes, it's bad. You know. I know it. People will still do it. Our job as developers is to accommodate the use of the software in the real world, not in the aseptic conditions of a laboratory.

So, yeah, some users will share a user account and it's likely one of them speaks a language the other doesn't. For example, one person might speak English and Greek, the other one English and Italian. Let's say the Greek guy selects Greek as the default language in the user account. The Italian tries to log in… and can't read a darned thing because even the alphabet looks weird. Just like above, they are having a bad day.

Solution

Add a language drop-down next to the username. The user can pick their preferred language, and Panopticon switches for the duration of the session.

This also acts as a hint. If the language icon appears as the generic language selector icon it means that Panopticon is using the default language selection rules (whatever the user language is, or if none is set the option in the System Configuration, or if none is set there fall back to en-GB). If a specific language is selected, either through the login screen or through this feature, the flag for that language and region is flown as the language selection icon, thus indicating both that a forced language was requested and what that language is.