Extension:LanguageCode

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
LanguageCode
Release status: beta
Implementation Variable
Description Magic words that display the current user or page language code
Author(s) Pierre Rudloff (Rudlofftalk)
Composer archi-strasbourg/language-code
License GNU General Public License 3.0
Download
README
Releases
Hooks used
ParserGetVariableValueSwitch
MagicWordwgVariableIDs
Translate the LanguageCode extension if it is available at translatewiki.net
Check usage and version matrix.

The LanguageCode extension adds some magic words that display the current user or page language code.

Installation[edit]

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

Usage[edit]

Display the user language[edit]

{{USERLANGUAGE}}

Display the page language[edit]

{{PAGELANGUAGE}}