Index: includes/DefaultSettings.php
===================================================================
--- includes/DefaultSettings.php	(revision 21792)
+++ includes/DefaultSettings.php	(working copy)
@@ -2169,6 +2169,20 @@
 $wgNoFollowNsExceptions = array();
 
 /**
+ * If true, non-local interwiki links in wiki text will be given
+ * the rel="nofollow" attribute as a hint to search engines that
+ * they should not be followed for ranking purposes.
+ */
+$wgNoFollowNonLocalInterwikiLinks = false;
+
+/**
+ * If true, all interwiki links in wiki text will be given the
+ * rel="nofollow" attribute as a hint to search engines that
+ * they should not be followed for ranking purposes.
+ */
+$wgNoFollowAllInterwikiLinks = false;
+
+/**
  * Robot policies per namespaces.
  * The default policy is 'index,follow', the array is made of namespace
  * constants as defined in includes/Defines.php
Index: includes/Linker.php
===================================================================
--- includes/Linker.php	(revision 21792)
+++ includes/Linker.php	(working copy)
@@ -200,7 +200,19 @@
 			$link = $nt->getPrefixedURL();
 			if ( '' == $text ) { $text = $nt->getPrefixedText(); }
 			$style = $this->getInterwikiLinkAttributes( $link, $text, 'extiw' );
-
+			
+			# Check to see if nofollow should be applied
+			global $wgNoFollowAllInterwikiLinks, $wgNoFollowNonLocalInterwikiLinks;
+			if( $wgNoFollowAllInterwikiLinks ) {
+				# apply nofollow to all interwiki links
+				$style .= ' rel="nofollow"';
+			} elseif ( $wgNoFollowNonLocalInterwikiLinks ) {
+				# apply nofollow only to non-local interwiki links
+				if( !$nt->isLocal() ) {
+					$style .= ' rel="nofollow"';
+				}
+			}
+			
 			$inside = '';
 			if ( '' != $trail ) {
 				$m = array();
