Open main menu

Manual:Hooks/MessageNotInMwNs

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"
	}
}

For MediaWiki ≤1.25:

$wgHooks['MessageNotInMwNs'][] = 'MyExtensionHooks::onMessageNotInMwNs';
Called from:File(s): cache/MessageCache.php

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

Warning Warning: This hook has been removed in 1.16, and may never be in a released version

DetailsEdit

  • &$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"