PHP code example of mediawiki / lingo

1. Go to this page and download the library: Download mediawiki/lingo library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mediawiki / lingo example snippets


 wfLoadExtension('Lingo');
 

$wgHooks['SetupAfterCache'][] = function() {

    // specify a different name for the terminology page (Default: 'Terminology' (or localised version). See MediaWiki:Lingo-terminologypagename.)
    //$GLOBALS['wgexLingoPage'] = 'Terminology';

    // 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;

};
bash
php ../../tests/phpunit/phpunit.php  --group extensions-lingo -c phpunit.xml.dist