Open main menu

Extension:Stick to That Language

MediaWiki extensions manual
OOjs UI icon advanced.svg
Stick to That Language
Release status: beta
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
  • $egSTTLanguageDisplaySelector
  • $egSTTLanguageTopLanguages
Translate the Stick to That Language extension if it is available at translatewiki.net
Check usage and version matrix.

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.

Contents

DownloadEdit

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

InstallationEdit

  • Download and place the file(s) in a directory called StickToThatLanguage in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    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.

ConfigurationEdit

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 DoEdit

  • Making the user preference option for choosing the languages sortable