Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1290,6 +1290,12 @@ |
1291 | 1291 | $links: array, intended to hold the result. Must be an associative array with |
1292 | 1292 | category types as keys and arrays of HTML links as values. |
1293 | 1293 | |
| 1294 | +'PageContentLanguage': allows changing the language in which the content of |
| 1295 | +a page is written. Defaults to the wiki content language ($wgContLang). |
| 1296 | +$title: Title object |
| 1297 | +&$pageLang: the page content language (either an object or a language code) |
| 1298 | +$wgLang: the user language |
| 1299 | + |
1294 | 1300 | 'PageHistoryBeforeList': When a history page list is about to be constructed. |
1295 | 1301 | $article: the article that the history is loading for |
1296 | 1302 | |
Index: trunk/phase3/includes/Title.php |
— | — | @@ -4277,6 +4277,7 @@ |
4278 | 4278 | * Defaults to $wgContLang, but in certain cases it can be e.g. |
4279 | 4279 | * $wgLang (such as special pages, which are in the user language). |
4280 | 4280 | * |
| 4281 | + * @since 1.18 |
4281 | 4282 | * @return object Language |
4282 | 4283 | */ |
4283 | 4284 | public function getPageLanguage() { |
Index: trunk/phase3/languages/Language.php |
— | — | @@ -218,6 +218,7 @@ |
219 | 219 | * |
220 | 220 | * @param $code string |
221 | 221 | * |
| 222 | + * @since 1.18 |
222 | 223 | * @return bool |
223 | 224 | */ |
224 | 225 | public static function isValidBuiltInCode( $code ) { |
Index: trunk/extensions/WikimediaIncubator/IncubatorTest.php |
— | — | @@ -631,6 +631,11 @@ |
632 | 632 | return true; |
633 | 633 | } |
634 | 634 | |
| 635 | + /** |
| 636 | + * Make the page content language depend on the test wiki |
| 637 | + * Only works for codes that are known to MediaWiki :( |
| 638 | + * @return true |
| 639 | + */ |
635 | 640 | static function onPageContentLanguage( $title, &$pageLang ) { |
636 | 641 | global $wmincTestWikiNamespaces, $wgOut; |
637 | 642 | $prefix = self::analyzePrefix( $title->getText(), /* onlyInfoPage*/ false ); |