Page MenuHomePhabricator

Multilingual wikis should show content in the language of the user's browser when available
Open, MediumPublic

Description

MediaWiki + Translate offer great possibilities for creating multilingual sites. However, when it comes to render content they still push anonymous users to English versions in their landing and every click.

If an anonymous user lands in i.e. https://www.mediawiki.org/wiki/How_to_contribute with a browser that has i.e. German as default language, the page shown by default should be https://www.mediawiki.org/wiki/How_to_contribute/de, not the default English version.

It can be that users with their browser in language X still prefer to read content in language Y. If they select another language in the language box, then they should be offered pages in that language when available, in that session or may as long as a cookie can provide the information about this user's choice.

Event Timeline

Qgil raised the priority of this task from to Needs Triage.
Qgil updated the task description. (Show Details)
Qgil added a subscriber: Qgil.
Nikerabbit triaged this task as Medium priority.Sep 9 2015, 6:53 AM
Nikerabbit added a subscriber: Nikerabbit.

You know as well as I do that this is not possible on Wikimedia sites due to caching issues. Special:MyLanguage must be used instead.

Another workaround would be to run some JavaScript which asks the user whether he wants to switch to the translated version and do that automatically in the future.

Please bare with my lack of knowledge about caching methods. Can't the server check the language of the browser before rendering any page, serving the cached page corresponding to that language?

The main use case of this request is to offer first-time anonymous users content in their language when available. Asking preferences for next visits (recognizing users with cookies?) might be an improvement, but I still wonder whether the good and consistent solution is possible.

I was referring to the fact that one url equals one content. Anything else needs exceptions in frontend caching layer (or bypassing it).

Are you looking for a solution that works for Wikimedia sites, or something for other wikis? The solution for former is likely much more involved than the latter.

Third party mediawikis would be a good start, yes. I also wonder whether Wikimedia multilingual sites (my use case is mediawiki.org) have the same problems of traffic/caching than, say, the big Wikipedias.

When $wgTranslatePageTranslationULS is true, could we redirect from any visit to the canonical URL of the translatable page to the translation page for the current interface language? To allow intentional visits of other translations, perhaps an URL parameter could be added; or there might be smarter solutions.

I also wonder whether Wikimedia multilingual sites (my use case is mediawiki.org) have the same problems of traffic/caching than, say, the big Wikipedias.

They have the problem that the same caching mechanism as Wikipedia's is imposed on them. :)

Serving different content at the same URL is bad most of the times anyway, users often become unable to choose what they want to see.

Serving different content at the same URL is bad most of the times anyway, users often become unable to choose what they want to see.

What about replacing content with translated content in-place? Something similar to how some javascript extensions work.