/**
* Language/charset variant links for classic-style skins
* @return string
+ *
+ * @fixed
*/
function variantLinks() {
- $s = '';
-
- /* show links to different language variants */
- global $wgDisableLangConversion;
-
- $title = $this->getSkin()->getTitle();
- $lang = $title->getPageLanguage();
- $variants = $lang->getVariants();
+ $s = array();
- if ( !$wgDisableLangConversion && sizeof( $variants ) > 1
- && !$title->isSpecialPage() ) {
- foreach ( $variants as $code ) {
- $varname = $lang->getVariantname( $code );
+ $variants = $this->data['content_navigation']['variants'];
- if ( $varname == 'disable' ) {
- continue;
- }
- $s = $this->getSkin()->getLanguage()->pipeList( array(
- $s,
- '<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
- ) );
- }
+ foreach ( $variants as $key => $link ) {
+ $s[] = $this->makeListItem( $key, $link, array( 'tag' => 'span' ) );
}
- return $s;
+ return $this->getSkin()->getLanguage()->pipeList( $s );
}
function otherLanguages() {