Extension:Babel

The Babel extension adds a parser function to replace the old Babel system that completely relied on templates. The extension is backward compatible, and supports existing templates (they simply override extension functionality).

On Wikipedia, the noun Babel (in reference to the Tower of Babel) refers to the texts on user pages aiding multilingual communication by making it easier to contact someone who speaks a certain language. The idea originated on the Wikimedia Commons and has also been implemented on other wikis.

Installation

 * 1) Place the source code into.
 * 2) Copy the code from Babel.css file into your MediaWiki:Common.css&mdash;you can change it as desired.
 * 3) Add   to.
 * 4) Enjoy!

If the CLDR extension is found language names are taken from that, otherwise built in MediaWiki language names are used.

Usage
Syntax for the #babel parser function is as follows:


 * Add one of the following codes for each language you speak or understand, separated by |, where xx is the ISO 639-1 code or ISO 639-3 code for the language. The general usage of each code level is as follows:
 * xx-0 if you don't understand the language at all.
 * xx-1 for basic ability - enough to understand written material or simple questions in this language.
 * xx-2 for intermediate ability - enough for editing or discussions.
 * xx-3 for advanced level - though you can write in this language with no problem, some small errors might occur.
 * xx-4 for 'near-native' level - although it's not your first language from birth, your ability is something like that of a native speaker.
 * xx-5 for professional proficiency.
 * xx (no hyphen or number) for native speakers who use a language every day and have a thorough grasp of it, including colloquialisms and idioms.

Configuration
Babel has four configuration variables which can be modified in LocalSettings.php.
 * $wgBabelUseLevelZeroCategory : A boolean (true or false) indicating whether users should be entered in to a category if they use xx-0; defaults to false.
 * $wgBabelUseSimpleCategories : A boolean (true or false) indicating whether categories for abilities should be used; defaults to false.
 * $wgBabelUseMainCategories : A boolean (true or false) indicating whether main categories featuring all users who specify a level for that language should be added to a xx category; defaults to true.
 * $wgBabelFavorStandard</tt> : Which ISO language code standard should be favoured, either ISO_639_1 or ISO 639_3; it has not been tested using ISO_639_3 yet and defaults to ISO_639_1.

Several customizations can also be made using MediaWiki namespace messages.
 * MediaWiki:babel-template-prefix and MediaWiki:babel-template-prefix : The prefix and suffix to be prepended or appended to the template name when one is being included.
 * MediaWiki:babel-portal-prefix and MediaWiki:babel-portal-prefix : The prefix and suffix to be prepended or appended to the target of the link from the language code.
 * MediaWiki:babel-category-prefix and MediaWiki:babel-category-prefix : The prefix and suffix to be prepended or appended to the name of the categories.