Manual:Hooks/MessageCache::get
![]() | This deprecated feature should no longer be used, but is still available for reasons of backwards compatibility. This feature was deprecated in version 1.41.0. Please see MessageCacheFetchOverrides for an alternative way to use this feature. |
[[Category:MediaWiki deprecated or obsolete features|]]
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.
Details[edit]
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 also[edit]
- MessagesPreLoad hook
- MessageCacheFetchOverrides hook