Open main menu

Extension:UILangCode

Other languages:
English • ‎Türkçe • ‎русский • ‎日本語
MediaWiki extensions manual
OOjs UI icon advanced.svg
UILangCode
Release status: stable
Implementation Parser extension
Description Implements {{UILANGCODE}} magic word to get interface language of the current user
Author(s) Niklas Laxström (Nikerabbittalk)
Latest version 1.0.0
Compatibility policy release branches
MediaWiki 1.29+
Database changes No
License GNU General Public License 2.0 or later
Download
Example Translatewiki.net
Translate the UILangCode extension if it is available at translatewiki.net
Check usage and version matrix.

The UILangCode extension implements the {{UILANGCODE}} magic word to get interface language of the current user.

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).

Extract the snapshot and place it in the extensions/UILangCode/ 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/UILangCode.git

InstallationEdit

  • Download and place the file(s) in a directory called UILangCode in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'UILangCode' );
    
  •   Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

UsageEdit

{{UILANGCODE}}

This will make the parser cache vary per user language, greatly decreasing hit rate and increasing storage.

See alsoEdit