Manual:$wgMessagesDirs/en

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.

Simple example:

Complex example:

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