Manual:$wgExtensionMessagesFiles

From MediaWiki.org
Jump to: navigation, search
Translate this page; This page contains changes which are not marked for translation.

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎Hawaiʻi • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil
Extensions: $wgExtensionMessagesFiles
Extension messages files.
Introduced in version: 1.11.0
Deprecated in version: 1.23.0
Removed in version: still in use
Allowed values: (array)
Default value: array()
Other settings: Alphabetical | By function

Details[edit]

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

Example:

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

Changed behavior in MediaWiki 1.23[edit]

Since MediaWiki 1.23, use of this variable to define messages is discouraged; instead, store messages in JSON format and use $wgMessagesDirsManual:$wgMessagesDirs. For setting other variables than $messages, $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.

See also[edit]