Lingo
A Guide to Using MediaWiki in a Hosted Environment
An instructional website by the developer of mh370wiki.net - a MediaWiki site about Malaysia Airlines Flight MH370.
Lingo is a glossary extension for MediaWiki. When a Term and related Definition are defined in a custom page, a Tooltip is displayed for each instance of that Term (word, acronym, abbreviation or phrase) on hover.
Extension:Lingo is well documented at https://www.mediawiki.org/wiki/Extension:Lingo
Lingo is not included with MediaWiki so must be installed manually. Additional settings are required in LocalSettings.php, particularly the name of the page which will hold the Terms and definitions.
On the mh370wiki.net website, and also here, I created a custom namespace called Tooltips. The page Lingo uses is named Glossary. In LocalSettings.php the settings for Lingo look like this:-
wfLoadExtension('Lingo');
$wgHooks['SetupAfterCache'][] = function() {
// specify a different name for the terminology page (Default: 'Terminology' (or localised version). See MediaWiki:Lingo-terminologypagename.)
$GLOBALS['wgexLingoPage'] = 'Tooltips:Glossary';
// specify that each term should be annotated only once per page (Default: false)
$GLOBALS['wgexLingoDisplayOnce'] = false;
// specify what namespaces should or should not be used (Default: Empty, i.e. use all namespaces)
//$GLOBALS['wgexLingoUseNamespaces'][NS_SPECIAL] = false;
// set default cache type (Default: null, i.e. use main cache)
$GLOBALS['wgexLingoCacheType'] = CACHE_NONE;
// use ApprovedRevs extension on the Terminology page (Default: false)
//$GLOBALS['wgexLingoEnableApprovedRevs'] = true;
};
For a small site, like this one, a separate namespace is unnecessary, but the mh370wiki.net has hundreds of tooltips and I wanted them out of NS_Main.
Before upgrading MediaWiki it is worth checking that the current version of Lingo works as expected. On this site Lingo installed with no issues but initially failed to display tooltip text. This problem was solved, as described in Lingo Upgrade Problems.
Links
- Extension:Lingo
- https://www.mediawiki.org/wiki/Extension:Lingo