Wikidata sometimes mentions a sister project in client recent changes + watchlist, especially since with the "other projects sidebar" feature, these changes might be of interest.
We don't have a decent mechanism to format links to the sister project pages, since we don't know the site group prefix (e.g. 'voy'). This knowledge is in SiteMatrix and in dumpInterwiki.php but not really accessible.
Then if a site has a site group prefix, then we need to append the "language" / subdomain.
We have special cases like wikidata itself that has no subdomain and has a special interwiki prefix ('d').
The mechanism should handle special cases. Possibly we could introduce settings that have mapping between site group and interwiki group prefix, and another for special cases.
$wgSiteGroupToInterwikiPrefix = array( 'wikivoyage' => 'voy', ... ); $wgSiteIdToInterwikiPrefix = array( 'wikidatawiki' => 'd' );
The mechanism could check $wgSiteIdToInterwikiPrefix and then $wgSiteGroupToInterwikiPrefix.