Jump to content

Manual:$wgExtensionMessagesFiles

From mediawiki.org
This page is a translated version of the page Manual:$wgExtensionMessagesFiles and the translation is 40% complete.
拡張機能: $wgExtensionMessagesFiles
拡張機能メッセージ ファイル。
導入されたバージョン:1.11.0
除去されたバージョン:使用中
許容される値:(配列)
既定値:[]

This global variable must only be used to specify the paths to internationalization files that define magic words , special page aliases and/or namespace names .

For message files , use $wgMessagesDirs instead and avoid overlap in variable names. $wgExtensionMessagesFiles 内のキーと同一のキーが $wgMessagesDirs 内にある場合は、$wgMessagesDirs が優先されます。

Example

The ConfirmEdit extension contains a PHP file, ConfirmEdit.alias.php, which defines language-specific aliases for a special page (Special:Captcha).

If the extension were to define the variable directly in PHP, it would have something like this:

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

extension.json

Instead of using our global variable directly, modern extensions like ConfirmEdit set the equivalent field ExtensionMessagesFiles in the extension.json file.

This field corresponds directly with $wgExtensionMessagesFiles :

	"ExtensionMessagesFiles": {
		"ConfirmEditAlias": "ConfirmEdit.alias.php"
	},


関連項目