Podręcznik:$wgExtensionMessagesFiles

From mediawiki.org
This page is a translated version of the page Manual:$wgExtensionMessagesFiles and the translation is 50% complete.
Rozszerzenia: $wgExtensionMessagesFiles
Pliki komunikatów dla rozszerzeń.
Wprowadzono w wersji:1.11.0
Usunięto w wersji:nadal w użyciu
Dozwolone wartości:(tablica)
Domyślna wartość:[]

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

Szczegóły

Tablica asocjacyjna przypisująca nazwę rozszerzenia do nazwy pliku gdzie znajdują się komunikaty wykorzystywane przez dane rozszerzenie. Plik musi zawierać zmienną $messages.

Przykład:

$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 backward compatible by using both $wgExtensionMessagesFiles and $wgMessagesDirs, and only one of the two will be used depending on what the version of MediaWiki supports.

Zobacz też