From d7e0fd581cc2aa95518c389266704f0e433da461 Mon Sep 17 00:00:00 2001 From: Tpt Date: Tue, 8 Oct 2013 16:57:42 +0200 Subject: [PATCH] OutputPage: Use PageViewLanguage instead of PageLanguage for mw.config This way wgPageContentLanguage will be the language of the displayed page content and not the language of the page as stored in the database. Affects other mw.config values as well: * wgPageContentLanguage * wgDefaultDateFormat * wgMonthNames * wgMonthNamesShort * wgSeparatorTransformTable * wgDigitTransformTable It does not change anything for most of kind of pages, expect for pages with special Content types like Wikibase entities that outputs the content of the page in the user language but store the page in a multilingual way. It fix the case that such entities have ever wgPageContentLanguage=en even if the page is fully displayed, as example, in French. Change-Id: Ib2073071b5d46eaf9cbd1d09ac92a842a0ef4233 --- includes/OutputPage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f5dbfc6d58..ab272baa16 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -3015,7 +3015,7 @@ $templates $articleId = $wikiPage->getId(); } - $lang = $title->getPageLanguage(); + $lang = $title->getPageViewLanguage(); // Pre-process information $separatorTransTable = $lang->separatorTransformTable(); -- 2.20.1