// Language in which the page content is (supposed to be) written
$pageLang = $title->getPageLanguage()->getCode();
+ $pageLangHtml = $pageLang . ' - ' .
+ Language::fetchLanguageName( $pageLang, $lang->getCode() );
+ // Link to Special:PageLanguage with pre-filled page title if user has permissions
if ( $config->get( 'PageLanguageUseDB' )
&& $title->userCan( 'pagelang', $user )
) {
- // Link to Special:PageLanguage with pre-filled page title if user has permissions
- $titleObj = SpecialPage::getTitleFor( 'PageLanguage', $title->getPrefixedText() );
- $langDisp = $linkRenderer->makeLink(
- $titleObj,
- $this->msg( 'pageinfo-language' )->text()
- );
- } else {
- // Display just the message
- $langDisp = $this->msg( 'pageinfo-language' )->escaped();
+ $pageLangHtml .= ' ' . $this->msg( 'parentheses' )->rawParams( $linkRenderer->makeLink(
+ SpecialPage::getTitleValueFor( 'PageLanguage', $title->getPrefixedText() ),
+ $this->msg( 'pageinfo-language-change' )->text()
+ ) )->escaped();
}
- $pageInfo['header-basic'][] = [ $langDisp,
- Language::fetchLanguageName( $pageLang, $lang->getCode() )
- . ' ' . $this->msg( 'parentheses', $pageLang )->escaped() ];
+ $pageInfo['header-basic'][] = [
+ $this->msg( 'pageinfo-language' )->escaped(),
+ $pageLangHtml
+ ];
// Content model of the page
$modelHtml = htmlspecialchars( ContentHandler::getLocalizedName( $title->getContentModel() ) );
"pageinfo-length": "Page length (in bytes)",
"pageinfo-article-id": "Page ID",
"pageinfo-language": "Page content language",
+ "pageinfo-language-change": "change",
"pageinfo-content-model": "Page content model",
"pageinfo-content-model-change": "change",
"pageinfo-robot-policy": "Indexing by robots",
"pageinfo-length": "The length of the page, in bytes.",
"pageinfo-article-id": "The numeric identifier of the page.\n{{Identical|Page ID}}",
"pageinfo-language": "Language in which the page content is written.",
+ "pageinfo-language-change": "Link text for a link to Special:PageLanguage. The link will be wrapped in parenthesis.\n{{Identical|Change}}",
"pageinfo-content-model": "The model in which the page content is written.\n\nUsed as label at [{{fullurl:Main Page|action=info}} action=info]. Followed by one of the following messages:\n* {{msg-mw|Content-model-wikitext}}\n* {{msg-mw|Content-model-javascript}}\n* {{msg-mw|Content-model-css}}\n* {{msg-mw|Content-model-text}}",
"pageinfo-content-model-change": "Link text for a link to Special:ChangeContentModel. The link will be wrapped in parenthesis.\n{{Identical|Change}}",
"pageinfo-robot-policy": "The search engine status of the page.\n\nUsed as label. Followed by any one of the following messages:\n*{{msg-mw|Pageinfo-robot-index}}\n*{{msg-mw|Pageinfo-robot-noindex}}",