Skip to content

Improve language selection #613

@lukasrad02

Description

@lukasrad02

Most pages on myHPI are available in German and English. Currently, myHPI serves the language specified in the url (i.e., German for all paths starting with /de/ and English for /en/) and defaults to the the preferred language according to the Accept-Language HTTP header, if the URL path does not contain a language identifier (such as the root page or any path with the language part stripped away). One can always switch to the other language using the link in the page footer.

While this is, in my opinion, a sensible behavior for first-time visitors, it can be tedious for frequent visitors. For example, someone who generally prefers English content on the Internet (and thus sets Accept-Language to English in their browser) but also understands German and wants to read the original German minutes on myHPI always has to switch to German first. Having the link to the other language in the footer is an additional hurdle, especially on long pages and for editors who frequently switch languages to check the content in both English and German.

I'd like to propose to move the language selection from the footer to the header, as the header contains most of the other relevant internal navigation features (menu, search). On mobile, one might combine design considerations with other elements that are currently located at the page bottom (see #609).

Additionally, I am interested in your opinions on the default language behavior. Some thoughts from my side are:

  • Would it make sense to allow users to set a default language on their account?
  • Should this language override language identifiers from URLs (so that Alice, who prefers German, will always be served the German content by default, even if Bob, who prefers English, sends her a link starting with /en/), or only override the HTTP header if no language was specified in the URL?
  • Should the preferred language of an account automatically change if the user switches language on any page, or should it only be changeable on a dedicated settings page?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions