MediaWiki  master
MediaWiki\Content\Hook\PageContentLanguageHook Interface Reference

Stable to implement. More...

Inheritance diagram for MediaWiki\Content\Hook\PageContentLanguageHook:

Public Member Functions

 onPageContentLanguage ( $title, &$pageLang, $userLang)
 Use this hook to change the language in which the content of a page is written. More...
 

Detailed Description

Stable to implement.

Definition at line 12 of file PageContentLanguageHook.php.

Member Function Documentation

◆ onPageContentLanguage()

MediaWiki\Content\Hook\PageContentLanguageHook::onPageContentLanguage (   $title,
$pageLang,
  $userLang 
)

Use this hook to change the language in which the content of a page is written.

Defaults to the wiki content language.

Since
1.35
Parameters
Title$title
Language | string&$pageLangPage content language. Input can be anything (under control of hook subscribers), but hooks should return Language objects. Language code strings are deprecated.
Language$userLangUser language
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: