Extension:Stick to That Language

MediaWiki extensions manual
Stick to That Language
Release status: unmaintained
Implementation Page action , MyWiki
Description Sticky 'uselang' parameter (language can be selected and stays when following internal links)
Author(s) Daniel Werner (Danwetalk)
Latest version 0.1-rc (2012-08-09)
MediaWiki 1.20.0+
PHP 5.3+
Database changes No
License GNU General Public License 2.0 or later
Download
readme
release notes
Parameters
  • $egSTTLanguageDisplaySelector
  • $egSTTLanguageTopLanguages
Hooks used
  • GetPreferences
  • UserGetDefaultOptions
  • SkinTemplateOutputPageBeforeExec
  • LinkBegin
  • BeforePageDisplay
  • GetLocalURL::Internal
  • AfterFinalPageOutput
Translate the Stick to That Language extension if it is available at translatewiki.net

The Stick to That Language extension allows to choose an interface language in a language selector. The uselang url parameter is used to set that language for the current page and will be added to all links to other internal pages. It introduces a user preferences option to choose preferred languages which will be displayed on top of the language selector.

Installation

  • Download and move the extracted StickToThatLanguage folder to your extensions/ directory.
    Developers and code contributors should install the extension from Git instead, using:cd extensions/
    git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/StickToThatLanguage
  • Add the following code at the bottom of your LocalSettings.php file:
    require_once "$IP/extensions/StickToThatLanguage/StickToThatLanguage.php";
    
  • Configure as required
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration

This extension comes with some customization options:

$egSTTLanguageDisplaySelector
(boolean) Allows to define whether the language selector should be used or not.
Default: true
$egSTTLanguageTopLanguages
(array) preferred languages (displayed on top) for the language switcher for non-logged-in users. Logged-in users can choose their preferred languages, these will be used instead. By default this is set to the busiest languages on Wikipedia. These languages are not used as defaults for the preferred languages user option.
Default: array( 'en', 'de', 'fr', 'nl', 'it', 'pl', 'es', 'ru', 'ja', 'pt' ); (languages of Wikipedias with the most articles)

To Do

  • Making the user preference option for choosing the languages sortable