Manual:Hooks/LanguageSelector

From mediawiki.org
Jump to navigation Jump to search
LanguageSelector
Available from version 1.24.0 (Gerrit change 153277)
Hook to change the language selector available on a page.
Define function:
public static function onLanguageSelector( $out, $cssClassName ) { ... }
Attach hook: In extension.json:
{
	"Hooks": {
		"LanguageSelector": "MyExtensionHooks::onLanguageSelector"
	}
}
Called from: File(s): SpecialPageLanguage.php
Interface: LanguageSelectorHook.php

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


Details[edit]

  • $out: The output page.
  • $cssClassName: CSS class name of the language selector.