Manual:$wgMessagesDirs

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎français • ‎italiano • ‎日本語 • ‎polski • ‎português • ‎português do Brasil
Extensions: $wgMessagesDirs
Extension messages directories.
Introduced 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 path of the directory where message files can be found. The message files are expected to be JSON files named for their language code, e.g. en.json, de.json, etc. Extensions with messages in multiple places may specify an array of message directories.

Simple example:

$wgMessagesDirs['ConfirmEdit'] = __DIR__ . '/i18n';

Complex example:

$wgMessagesDirs['VisualEditor'] = array(
    __DIR__ . '/i18n',
    __DIR__ . '/modules/ve-core/i18n',
    __DIR__ . '/modules/qunit/localisation',
    __DIR__ . '/modules/oojs-ui/messages',
);

$wgMessagesDirs can co-exist with $wgExtensionMessagesFilesManual:$wgExtensionMessagesFiles; both should be set, if you want to preserve compatibility when converting old PHP l10n files.

See also[edit]