Jump to navigation Jump to search
This page is a translated version of the page Manual:$wgExtensionMessagesFiles and the translation is 33% complete.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎magyar • ‎polski • ‎português • ‎português do Brasil • ‎日本語
Extensions: $wgExtensionMessagesFiles
Extension messages files.
Introduit dans la version :1.11.0
Retiré dans la version :Encore utilisé
Valeurs autorisées :(array)
Valeur par défaut :[]
Autres paramètres : Alphabétique | Par Fonction

This should only be used to specify files that define $magicWords and $specialPageAliases. Its usage for $messages is deprecated.


Associative array mapping extension name to the filename where messages can be found. The file must create a variable called $messages.


$wgExtensionMessagesFiles['ConfirmEdit'] = __DIR__ . '/ConfirmEdit.i18n.magic.php';

Changed behavior in MediaWiki 1.23

Since MediaWiki 1.23, use of this variable to define messages is deprecated; instead, store messages in JSON format and use $wgMessagesDirs . For setting other variables than $messages (such as $magicWords and $specialPageAliases), $wgExtensionMessagesFiles should still be used.

If there is an entry in $wgMessagesDirs with the same key as one in $wgExtensionMessagesFiles, then any $messages variables set in the $wgExtensionMessagesFiles file will be ignored. This means an extension that only provides messages can be backwards compatible by using both $wgExtensionMessagesFiles and $wgMessagesDirs, and only one of the two will be used depending on what the version of MediaWiki supports.

Voir aussi