Manual:$wgMessagesDirs/da

From Linux Web Expert

Revision as of 16:41, 2 February 2021 by imported>FuzzyBot (Updating to match new version of source page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<translate> Extensions</translate>: $wgMessagesDirs
Extension messages directories.
<translate> Introduced in version:</translate>1.24.0 (Gerrit change 102957; git #2f7b68ff)
<translate> Removed in version:</translate><translate> still in use</translate>
<translate> Allowed values:</translate>(array)
<translate> Default value:</translate>[]

Details

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.

Simeplt eksempel:

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

Compleskst eksempel:

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

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

See also