MediaWiki REL1_39
MediaWiki\Hook\GetLangPreferredVariantHook Interface Reference

This is a hook handler interface, see docs/Hooks.md. More...

Inheritance diagram for MediaWiki\Hook\GetLangPreferredVariantHook:

Public Member Functions

 onGetLangPreferredVariant (&$req)
 This hook is called in LanguageConverter::getPreferredVariant() to allow fetching the language variant code from cookies or other such alternative storage.
 

Detailed Description

This is a hook handler interface, see docs/Hooks.md.

Use the hook name "GetLangPreferredVariant" to register handlers implementing this interface.

Stability: stable
to implement

Definition at line 12 of file GetLangPreferredVariantHook.php.

Member Function Documentation

◆ onGetLangPreferredVariant()

MediaWiki\Hook\GetLangPreferredVariantHook::onGetLangPreferredVariant ( & $req)

This hook is called in LanguageConverter::getPreferredVariant() to allow fetching the language variant code from cookies or other such alternative storage.

Since
1.35
Parameters
string | null&$reqLanguage variant from the URL or null if no variant was specified in the URL; the value of this variable comes from LanguageConverter::getURLVariant()
Returns
bool|void True or no return value to continue or false to abort

Implemented in MediaWiki\HookContainer\HookRunner.


The documentation for this interface was generated from the following file: