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
release notes
  • $egSTTLanguageDisplaySelector
  • $egSTTLanguageTopLanguages
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.

Download edit

The extension can be retrieved directly from Git [?]:

  • Browse code
  • Some extensions have tags for stable releases.
  • Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
    • [[Special:ExtensionDistributor/StickToThatLanguage

|Browse branches]]

    • Select a branch name
    • Click "Continue"

Extract the snapshot and place it in the extensions/StickToThatLanguage/ directory of your MediaWiki installation.

If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows:

cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/StickToThatLanguage.git

Installation edit

  • 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
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Configuration edit

This extension comes with some customization options:

(boolean) Allows to define whether the language selector should be used or not.
Default: true
(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 edit

  • Making the user preference option for choosing the languages sortable