this might do the trick efficiently:
1. on save, identify redlinks and create pages as '#redirect
[[wikipedia:{{{PAGENAME}}}]]' if a wikipedia page exists
2. on html generation, or using JavaScript and the API, find linked
redirects containing interwikis and render them in the page as
external links to the redirect target, rather than as internal links
to a local page containing a external link.
If step two is done in php and cached, rather than JS, the cache is
stale whenever a redirect page with an interwiki is turned into a
normal page with text, so all pages that link to the redirect page
will need to be regenerated.
--
John Vandenberg