Skip to content

Contextual language switcher #993

Open
@chikamichi

Description

@chikamichi

Hi,

I was wondering whether it could be a valuable feature to turn the language switcher in the footer into something a little bit smarter by trying to redirect to the same (translated) page in a different language, with a fallback to the homepage.

It would probably require performing a preflight AJAX GET request, to check whether it's a 404 (in which case, we should head the user to the homepage for the chosen language, instead of just altering the language). Hopefully this is a very limited burden.

The idea here would be to allow efficient switching between languages without loss of context, something especially useful when browsing the news (but not only). It could be implemented with progressive enhancement, by keeping the hard-coded link to the homepage (/en, /ja, /de…) in the DOM and having JS "kicking in" to provide the extra, smart-redirect feature.

What do you think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions