Manual:Hooks/MessageNotInMwNs

From mediawiki.org
Jump to navigation Jump to search
MessageNotInMwNs
Available from version 1.16.0
Removed in version 1.16.0
When trying to get a message that isn't found in the MediaWiki namespace (but before checking the message files)
Define function:
public static function onMessageNotInMwNs( &$message, $lckey, $langcode, $isFullKey ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"MessageNotInMwNs": "MyExtensionHooks::onMessageNotInMwNs"
	}
}
Called from: File(s): cache/MessageCache.php
Interface: MessageNotInMwNsHook.php

For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:MessageNotInMwNs extensions.


Details[edit]

  • &$message: message's content; can be changed
  • $lckey: message's name
  • $langcode: language code
  • $isFullKey: specifies whether $lckey is a two part key "msg/lang"