Wikimedia

Add a new {{PAGELANGUAGE}} variable for use in wikitext

The MediaWiki software allows users to set the language of individual pages on the wiki. However, it doesn't offer a way to access that information from wikitext.

Your task is to add a {{PAGELANGUAGE}} variable to MediaWiki's parser, which returns the language code of the page being parsed. This will be similar to the existing variables {{PAGEID}}, {{CURRENTMONTHNAME}}, etc. See the linked Phabricator task, particularly the recent comments, for more information.

You will also need to add a parser test to the tests/parser/parserTests.txt file to ensure that this feature works as desired.

(Hint: When using git grep for this task, add the -i switch to perform a case-insensitive search.)

Task tags

  • mediawiki
  • php
  • wikitext

Students who completed this task

David Sn

Task type

  • code Code
close

2016