* jsMessage: Redesigned in Vector/Monobook as floating bubble with auto-hide.
* New hook 'ParserTestGlobals' allows to set globals before running parser tests.
* Allow importing pages as subpage.
+* Add lang and hreflang attributes to language links on Login page.
=== Bug fixes in 1.20 ===
* (bug 30245) Use the correct way to construct a log page title.
// no link for currently used language
return htmlspecialchars( $text );
}
- $attr = array( 'uselang' => $lang );
+ $query = array( 'uselang' => $lang );
if( $this->mType == 'signup' ) {
- $attr['type'] = 'signup';
+ $query['type'] = 'signup';
}
if( $this->mReturnTo !== '' ) {
- $attr['returnto'] = $this->mReturnTo;
- $attr['returntoquery'] = $this->mReturnToQuery;
+ $query['returnto'] = $this->mReturnTo;
+ $query['returntoquery'] = $this->mReturnToQuery;
}
+
+ $attr = array();
+ $targetLanguage = Language::factory( $lang );
+ $attr['lang'] = $attr['hreflang'] = $targetLanguage->getHtmlCode();
+
return Linker::linkKnown(
$this->getTitle(),
htmlspecialchars( $text ),
- array(),
- $attr
+ $attr,
+ $query
);
}
}