Extension:WRLanguageLinks

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
OOjs UI icon advanced.svg
WRLanguageLinks
Release status: experimental
Implementation Tag
Description Display a list of inter-language links in a given article
Author(s) FreedomFighterSparrow (Kol-Zchut Ltd.)
Latest version 0.1.0
MediaWiki 1.17.2
License GNU General Public License 2.0 or later
Download ZIP file on Mediafire.com, or source on GitHub.com [ From here]
wgWRLanguageLinksShowOnly, wgWRLanguageLinksListType, wgWRLanguageLinksShowTitles
Translate the WRLanguageLinks extension if it is available at translatewiki.net
Check usage and version matrix.

What can this extension do?[edit]

This simple tag extension simply produces the list of inter-language links in a given article. It was created for the Victoria skin, which has no sidebar to display the original list generated by Mediawiki.

Usage[edit]

In its current form, there are no on-page configuration options, and it simply used by writing <languagelinks /> anywhere you want it on page.

Download instructions[edit]

Download from here; extract into $IP/extensions/. Note: $IP stands for the root directory of your MediaWiki installation, the same directory that holds LocalSettings.php.

Installation[edit]

To install this extension, add the following to LocalSettings.php:

require_once( "$IP/extensions/WRLanguageLinks/WRLanguageLinks.php" );

Configuration parameters[edit]

The following configuration options are available:

$wgWRLanguageLinksShowOnly (comma-separated list of language codes)
Useful for limiting the language links displayed to a few selected languages. For example, we have all of the language links copied to all wikis in the farm using a bot, but don't want to point from the Arabic wiki to the English one.
Example: $wgWRLanguageLinksShowOnly = 'ar,en';
Default value is NULL, and all language links are displayed.
$wgWRLanguageLinksListType ('normal'/'flat')
Can be one of the following:
  1. 'normal': this is the defualt, meaning show a regular ("<ul">) list.
  2. 'flat': this creats an inline list, without bullets.
$wgWRLanguageLinksShowTitles (boolean)
The default is 'false', and keeps the default Mediawiki behavior of showing language names and use the page title as a tooltip (the title attribute of the link). If set to true, the behavior will be flipped - the page title will show as the link, and the language name will become the tooltip.

Customization[edit]

This extension adds a couple of messages that may be overridden, as well as a few CSS classes for the list. Simply peek at the code.