From: Tpt Date: Tue, 8 Oct 2013 14:57:42 +0000 (+0200) Subject: OutputPage: Use PageViewLanguage instead of PageLanguage for mw.config X-Git-Tag: 1.31.0-rc.0~7173^2 X-Git-Url: http://git.cyclocoop.org/%27%2C%20%20%20quote_amp%28%24url%29%2C%20%20%20%27?a=commitdiff_plain;h=d7e0fd581cc2aa95518c389266704f0e433da461;p=lhc%2Fweb%2Fwiklou.git 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 --- 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();