Extension:AddMessages
From Linux Web Expert
AddMessages Release status: beta |
|
---|---|
Implementation | User interface |
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+ |
PHP | 5.3+ |
Database changes | No |
License | GNU General Public License 2.0 or later |
Download | |
|
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Translate the AddMessages extension if it is available at translatewiki.net |
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
- <translate> [[<tvar name=2>Special:ExtensionDistributor/AddMessages</tvar>|Download]] and move the extracted <tvar name=name>
AddMessages
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/AddMessages - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'AddMessages' ); $wgAmMessages = array();
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
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
Categories:
- Pages with script errors
- Pages with broken file links
- Beta status extensions
- Extensions without an image
- User interface extensions
- Extensions without a compatibility policy
- Extensions with manual MediaWiki version
- GPL licensed extensions
- Extensions in Wikimedia version control
- LocalisationCacheRecache extensions
- All extensions