Page MenuHomePhabricator

Storing multiple sitelinks to a multilingual wiki
Open, Needs TriagePublic

Description

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

Yurik created this task.Oct 7 2018, 7:24 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 7 2018, 7:24 PM
Uzume added a subscriber: Uzume.Thu, Jan 9, 9:51 PM

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).

Koavf added a subscriber: Koavf.Fri, Jan 10, 1:21 AM