Manual:Hooks/LanguageGetSpecialPageAliases
This feature was removed from MediaWiki core in version 1.33.0. Please see registering special page aliases with "ExtensionMessagesFiles" for an alternative way to use this feature. |
LanguageGetSpecialPageAliases | |
---|---|
Available from version 1.9.0 Removed in version 1.33.0 (Gerrit change 439793) Use to define aliases of special pages names depending of the language. | |
Define function: | public static function onLanguageGetSpecialPageAliases( &$specialPageAliases, $langCode ) { ... }
|
Attach hook: | In extension.json:
{
"Hooks": {
"LanguageGetSpecialPageAliases": "MediaWiki\\Extension\\MyExtension\\Hooks::onLanguageGetSpecialPageAliases"
}
}
|
Called from: | File(s): ../languages/Language.php |
Interface: | LanguageGetSpecialPageAliasesHook.php |
For more information about attaching hooks, see Manual:Hooks .
For examples of extensions using this hook, see Category:LanguageGetSpecialPageAliases extensions.
Details
editIn 1.9, 1.10 and 1.11, this was misspelled LangugeGetSpecialPageAliases (missing the letter "a" in "Language").
From 1.13 to 1.15, you can use
$wgExtensionAliasesFiles
.$specialPageAliases
: associative array of magic words synonyms$lang
: language code (string)