Extension:AddMessages

Category:Extensions without an imageCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
AddMessages
Release status: betaCategory:Beta status extensions
Implementation User interfaceCategory:User interface extensions
Description Allows admins to add or replace default messages using a global variable
Author(s) Ike Hecht (tosfostalk)
Latest version 0.2 (March 2019)
MediaWiki 1.25+Category:Extensions with manual MediaWiki version
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
  • $wgAmMessages
Quarterly downloads 15 (Ranked 92nd)
Translate the AddMessages extension if it is available at translatewiki.net
Category:All extensions

The AddMessages extension allows admins to add or replace default messages using a global variable. This can be set in LocalSettings.php. Other extensions could potentially set this variable or implement similar code in order to add messages. This used to be possible with $wgMessageCache->addMessage() but that feature has been removed. This feature is particularly useful in wikifarms, where it may not be practical to add a particular message to every individual site.

Installation

  • Download and move the extracted AddMessages folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AddMessages
  • Add the following code at the bottom of your LocalSettings.php file:
    wfLoadExtension( 'AddMessages' );
    $wgAmMessages = array();
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration parameters

$wgAmMessages
An array of message key and value pairs. Will take precedence over existing messages. Example:
$wgAmMessages = array( 'toolbox' => 'My Toolbox' );

See also

Category:All extensions Category:Beta status extensions Category:Extensions in Wikimedia version control Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:LocalisationCacheRecache extensions Category:User interface extensions