Manual:Hooks/MessageCache::get
MessageCache::get | |
---|---|
Available from version 1.23.0 Allows changing a message key, to customize it before the translation is accessed | |
Define function: | public static function onMessageCache_get( &$lckey ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"MessageCache::get": "MyExtensionHooks::onMessageCacheget"
}
}
|
Called from: | File(s): cache/MessageCache.php |
Interface: | MessageCache::getHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:MessageCache::get extensions.
DetailsEdit
Both the input and output keys must have an initial lowercase character. No spaces can be used in the keys; any spaces must be converted to underscores.
- &$lckey - Message key to check and optionally customize
See alsoEdit
- MessagesPreLoad hook