Available from version 1.19.0
Use to change the path of a localisation file.
Define function:
public static function onLanguage_getMessagesFileName( $code, &$file ) { ... }
Attach hook: In extension.json:
	"Hooks": {
		"Language::getMessagesFileName": "MediaWiki\\Extension\\MyExtension\\Hooks::onLanguagegetMessagesFileName"
Called from: File(s): ../languages/Language.php
Interface: Language__getMessagesFileNameHook.php

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

Details edit

  • $code: The language code or the language we're looking for a messages file for
  • &$file: The messages file path, you can override this to change the location.