Extension:WRLanguageLinks
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 | GPL v2+ | ||
Download | ZIP file on Mediafire.com, or source on GitHub.com [ From here] | ||
|
|||
|
|||
Translate the WRLanguageLinks extension if it is available at translatewiki.net |
|||
Check usage and version matrix; code metrics |
Contents
What can this extension do?[edit | edit source]
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 | edit source]
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 | edit source]
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 | edit source]
To install this extension, add the following to LocalSettings.php:
require_once( "$IP/extensions/WRLanguageLinks/WRLanguageLinks.php" );
Configuration parameters[edit | edit source]
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:
- 'normal': this is the defualt, meaning show a regular ("<ul">) list.
- '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 | edit source]
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.