wfRunHooks( 'EditPageGetPreviewText', array( $this, &$toparse ) );
- // In which language to parse the page
- // (Should this still be only for MediaWiki pages, or for all pages?)
- if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
- $parserOptions->setTargetLanguage( $this->mTitle->getPageLanguage() );
- }
$parserOptions->setTidy( true );
$parserOptions->enableLimitReport();
$parserOutput = $wgParser->parse( $this->mArticle->preSaveTransform( $toparse ),
if ( $target !== null ) {
return $target;
} else {
- return $this->mOptions->getInterfaceMessage() ? $wgLang : $wgContLang;
+ return $this->mOptions->getInterfaceMessage() ? $wgLang : $this->mTitle->getPageLanguage();
}
}