Manual:Hooks/UserGetLanguageObject
UserGetLanguageObject | |
---|---|
Available from version 1.18.0 (r83405, CodeReview archive) Called when getting user's interface language object. | |
Define function: | public static function onUserGetLanguageObject( $user, &$code ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"UserGetLanguageObject": "MediaWiki\\Extension\\MyExtension\\Hooks::onUserGetLanguageObject"
}
}
|
Called from: | File(s): RequestContext.php |
Interface: | UserGetLanguageObjectHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:UserGetLanguageObject extensions.
Details
edit- $user: User object
- &$code: Language code that will be used to create the object