Page MenuHomePhabricator

Storing multiple sitelinks to a multilingual wiki
Open, Needs TriagePublic


In the case of multilingual wiki (Wikidata, Commons, OSM wiki), there could exist pages in multiple languages all representing the same topic. Currently, it is only possible to store only one sitelink per wiki. One hacky workaround could be to store data as monolingual strings.

What would be the best way to change Wikibase to support multilingual wikis via sitelinks? Current sitelink system relies on wiki ID, not on language ID.

See also T54971: [Goal] Sitelinks and arbitrary accesses to Incubator, OldWikisource and BetaWikiversity

Event Timeline

I am against having multiple site links per wiki per WD item. On the other hand, I am not against having a translation system for these sitelinks and it might be good to have some method to automatically prefix item sitelink links to multilingual wikis using something like Special:MyLanguage/.

For example, although one can interwiki link to mw:Extension:Wikibase Client and mw:Extension:Wikibase Client/ja, I do not think Extension:Wikibase Client (Q21679293) should have sitelink links for both of these. However, I do think it would be useful for the sitelink to be resolved as if it linked to mw:Special:MyLanguage/Extension:Wikibase Client allowing users with Japanese set as their language on the Mediawiki wiki to automatically arrive at mw:Extension:Wikibase Client/ja.

Implementing sitelink link prefixing (targeting Special redirectors) in Wikidata allows individual wikis to evolve on their own implementing their own translations systems such as the one currently deployed at most multilingual wikis today: mw:Extension:Translate.

I realize this does not handle anonymous users without accounts since they cannot set local user preferences but in most cases it still only takes them a single extra click to get from the target base language page to the translated page and if it does not already do so, mw:Extension:Translate could be made to handle inbound requests for Special:MyLanguage/ using language-based HTTP content negotiation (Q1128629) (i.e., HTTP Accept-Language headers).

This comment was removed by C933103.

Note that in addition to multilingual wiki, there are also wikiprojects like Wikipedia for Min Nan, where same article on same subject are being written in same language in multiple different article using multiple script, due to technical difficulty making automatic conversion between these different articles impossible.
Currently, wikidata can only handle one site link to one script version of article on such sort of Wikipedia, and linking to another article through another wikidata QID entity, making article in the other script cannot be easily accessed through interlanguage link.