Skip to content

Improve navigation UX for non-English web visitors

So I've been mulling over our website's translations while working this MR: gracefully degrade 404s to default language (tpo!656 - merged)

Nowadays, most browsers (but not Tor Browser) have a setting for users to select language preferences, allowing websites to negotiate an appropriate content language right from the very first visit. Many popular websites support this, including the Wikipedia landing page and the Debian project website. On a technical level, this is implemented using the Accept-Language header.

Unfortunately, our current websites don't take these preferences into account. All our users who prefer reading in a language other than English must locate our language dropdown menu and manually select their language of choice from a (sometimes) long list. Even worse, even once that choice is made, if they happen to navigate to another Tor Project website (say, from the main website to the support website), they will be directed to the English version of that website, even if a translation is available in their langauge!

I would like to propose several easy to implement improvements to this user experience.

First, gracefully degrading language URLs when translations are unavailable. This is MR gracefully degrade 404s to default language (tpo!656 - merged) and more-or-less a no-brainer which can be implemented immediately on all our webistes. If a visitor follows a link to <website>.tpo/zz and zz is not a language we have a translation for, then redirect to the default (English) page instead of presenting a "404 Not found" page. Furthermore, if a visitor follows a link to <website>.tpo/fr-CA and we don't have a fr-CA translation but we do have fr, then redirect to <website>.tpo/fr instead of either showing a "404 Not found" page or defaulting to English. The proposed mechanism would replace the hand-curated list of "unavailable language" redirections in each website's .htaccess file, which is susceptible to become outdated resulting in potential 404 errors.

Second, we could systematically include the currently-active language in cross-TPO-website URLs (eg. the "About", "Support", "Community" links in the page headers) since the risk of leading visitors to 404 pages becomes non-existent with the implementation of the above solution. At worst, the default language version of a page will always be reached.

Third, I would like to propose that we follow visitors' browser-defined language preferences on all our website's homepages (but only the homepage!). I think this would improve our website's UX dramatically for users who understand little or no English, while also helping showcase the work of many contributors who work on website translations, potentially increasing these contributor's motivation and helping recruit more translators hoping to improve existing translations. The risk here is forcing an unwanted translation to users who don't control their browser's setting, for example in restricted computing environments. This would be mitigated by ensuring that selecting "English" in the language drop-down menu always leads to the English homepage, without any additional redirections. On a technical level, this implementation would be very simple and rely on already-enabled software on the webserver side (mod_mime and mod_negotiate).

In a bout of curiosity and enthusiasm, I've already figured out the technical solution (for both Lego- and Marble-based websites) to all these three proposals, so I'm mainly interested to know your opinions about whether these are good ideas and we want this new behavior at all.

/cc @emmapeel @gus @donuts @arma