Manual:Hooks/NormalizeMessageKey
From MediaWiki.org
| NormalizeMessageKey | |
|---|---|
| Available from version 1.13.0 Allows extensions to change what system message will be displayed on a page |
|
*Define function: |
function fnMyHook( &$key, &$useDB, &$langCode, &$transform ) { ... }
|
*Attach hook: |
$wgHooks['NormalizeMessageKey'][] = 'MyExtensionHooks::someExample'; |
| Called from: | GlobalFunctions.php |
*For more information about attaching hooks, see Manual:Hooks.
*For examples of extensions using this hook, see Category:NormalizeMessageKey extensions.
[edit] Details
- &$key: (string) The message going to be displayed. Change this to display a different message in its place
- &$useDB: (bool) Whether to query the database to get the message
- &$langCode: (string or bool) If a string, the language code that should be used to get the message, if bool true, uses the content language, if bool false, uses the site's default language
- &$transform: (bool) Whether to expand templates and variables in the message
