hoo added a comment. |
Thinking about this more, we could provide a mw.wikibase.getUserLanguageSitelink( entityId, 'wikipedia' )/mw.wikibase.entity:getUserLanguageSitelink( entityId, 'wikipedia' ) which would return the sitelink on the Wikipedia which has the user's language or nil if there's none. Implementing a fallback here for finding other potentially relevant Wikipedias would be possible (based on Language fallbacks), but I'm not sure that's very useful.
We could even make the second parameter (the site group, like "wikipedia") default to the languageLinkSiteGroup which is "wikipedia" in case of commons.
TASK DETAIL
EMAIL PREFERENCES
To: hoo
Cc: hoo, Jarekt, Zolo, Aklapper, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331
Cc: hoo, Jarekt, Zolo, Aklapper, GoranSMilovanovic, QZanden, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs