From d6cccddf1d2d0173ba9c450e3151352e85de1b4a Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Fri, 23 Jan 2009 02:11:20 +0000 Subject: [PATCH] (bug 1433) Add meta-information to pages with language links. --- includes/OutputPage.php | 14 ++++++++++++++ languages/messages/MessagesEn.php | 1 + 2 files changed, 15 insertions(+) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 94742e7681..2af993a163 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -1541,6 +1541,20 @@ class OutputPage { $tags[] = Xml::element( 'link', $tag ); } + // Language Links + global $wgContLang; + $langLinks = $this->getLanguageLinks(); + foreach( $langLinks as $link ) { + $t = Title::newFromText( $link ); + $tags[] = Xml::element( 'link', array( + 'title' => wfMsg( 'language-link-title', $wgContLang->getLanguageName( $t->getInterwiki() ) ), + 'rel' => 'alternate', + 'lang' => $t->getInterwiki(), + 'hreflang' => $t->getInterwiki(), + 'href' => $t->getFullURL() + ) ); + } + if( $wgFeed ) { global $wgTitle; foreach( $this->getSyndicationLinks() as $format => $link ) { diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index b624c218d0..ac227753c6 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -3791,4 +3791,5 @@ Enter the filename without the "{{ns:file}}:" prefix.', #Put all regex fragments above this line. Leave this line exactly as it is', +'language-link-title' => '$1 version', ); -- 2.20.1