foreach ( $variants as $code ) {
$varname = $lang->getVariantname( $code );
- if ( $varname == 'disable' ) {
- continue;
- }
$s = $wgLang->pipeList( array(
$s,
'<a href="' . htmlspecialchars( $title->getLocalURL( 'variant=' . $code ) ) . '" lang="' . $code . '" hreflang="' . $code . '">' . htmlspecialchars( $varname ) . '</a>'
foreach( $variants as $code ) {
// Gets variant name from language code
$varname = $pageLang->getVariantname( $code );
- // Checks if the variant is marked as disabled
- if( $varname == 'disable' ) {
- // Skips this variant
- continue;
- }
// Appends variant link
$content_navigation['variants'][] = array(
'class' => ( $code == $preferred ) ? 'selected' : false,
'video-info' => 'Video information, used by Language::formatTimePeriod() to format lengths in the above messages',
'badimagelist' => 'Bad image list',
'variantname-zh' => "Short names for language variants used for language conversion links.
-To disable showing a particular link, set it to 'disable', e.g.
-'variantname-zh-sg' => 'disable',
Variants for Chinese language",
'variantname-gan' => 'Variants for Gan language',
'variantname-sr' => 'Variants for Serbian language',