From: Liangent Date: Sat, 23 Mar 2013 08:07:33 +0000 (+0000) Subject: Fix various language tags used in Html attribs to use wfBCP47() X-Git-Tag: 1.31.0-rc.0~19312^2 X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=commitdiff_plain;h=423f550009173e4df0e70e016831d293c8f5d1df;p=lhc%2Fweb%2Fwiklou.git Fix various language tags used in Html attribs to use wfBCP47() Change-Id: I823ffacf5a55e53d6ab5383c1a42a9199d56f11d --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 3657ac30bc..96a503e81c 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3215,7 +3215,7 @@ $templates foreach ( $variants as $_v ) { $tags["variant-$_v"] = Html::element( 'link', array( 'rel' => 'alternate', - 'hreflang' => $_v, + 'hreflang' => wfBCP47( $_v ), 'href' => $this->getTitle()->getLocalURL( array( 'variant' => $_v ) ) ) ); } diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 18f410a35c..3c58f48cf8 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -156,8 +156,8 @@ class SkinTemplate extends Skin { 'text' => $ilLangName, 'title' => $languageLinkTitle->getText(), 'class' => $class, - 'lang' => $ilInterwikiCode, - 'hreflang' => $ilInterwikiCode + 'lang' => wfBCP47( $ilInterwikiCode ), + 'hreflang' => wfBCP47( $ilInterwikiCode ), ); } } @@ -1043,8 +1043,8 @@ class SkinTemplate extends Skin { 'class' => ( $code == $preferred ) ? 'selected' : false, 'text' => $varname, 'href' => $title->getLocalURL( array( 'variant' => $code ) + $params ), - 'lang' => $code, - 'hreflang' => $code + 'lang' => wfBCP47( $code ), + 'hreflang' => wfBCP47( $code ), ); } }