Currently PathRouter understands variants of $wgContLang only, and it
wouldn't be easy to extend it to variants of the given title because at
the time of preparing PathRouter for parsing, the title is unknown yet.
Bug: 52852
Bug: 52850
Change-Id: I7dcf7dc73e36945e420a66d99329c09c75b17882
$url = str_replace( '$1', $dbkey, $wgArticlePath );
wfRunHooks( 'GetLocalURL::Article', array( &$this, &$url ) );
} else {
- global $wgVariantArticlePath, $wgActionPaths;
+ global $wgVariantArticlePath, $wgActionPaths, $wgContLang;
$url = false;
$matches = array();
if ( $url === false &&
$wgVariantArticlePath &&
+ $wgContLang->getCode() === $this->getPageLanguage()->getCode() &&
$this->getPageLanguage()->hasVariants() &&
preg_match( '/^variant=([^&]*)$/', $query, $matches ) )
{