Extension:Babel/sco

The Babel extension eiks ae parser function tae replace the auld Babel system that compleatlie relied apon templates. Gif aen onrecognised leid guidein is speceefied, it will see gif thaur's aen exeestin template wi the name an incluid thon.

Oan Wikimedia waurks, the noon Babel (reeferencin the Tower o Babel) refers tae the texs oan uiser pages aidin monieleidic communication bi makin it easier tae contact somebodie that speaks ae giein leid. The idea wis born in the Wikimedia Commons an haes been implemented oan monie ither wikis an aw.

Instawation

 * 1)  or dounlid ae snapshot. Chuiss the version that matches yer version o MediaWiki.
 * 2) Creaut ae directerie   in yer   directerie.
 * 3) Extract the files to this   directerie.
 * 4) Eik   tae the bottom o LocalSettings.php.
 * 5) The CSS is found in the file  . Ye can change the style whaniver ye want bi owerridin thaim in the page  . Afore version  ye haed tae capie aw the CSS tae.
 * 6) Instawation can nou be verified through Special:Version o yer wiki.

Gif the is foond than leid names ar taen fae that (whaur owersets ar no available), itherwise built in MediaWiki leid names an Ingils defauts ar uised.

Uissage
Syntax fer the  parser function is as follaes:

Eik yin o the follaein codes fer ilka leid that ye speak or unnerstaunnd, separatit bi, whaur   is the MediaWiki leid code, ISO 639-1 code, or ISO 639-3 code fer the leid. The general uissage o ilka code level is aes follaes:


 * : If you don't understand the language at all.
 * : Basic ability - enough to understand written material or simple questions in this language.
 * : Intermediate ability - enough for editing or discussions.
 * : Advanced level - though you can write in this language with no problem, some small errors might occur.
 * : "Near-native" level - although it's not your first language from birth, your ability is something like that of a native speaker.
 * : Professional proficiency.
 * or : Native speakers who use a language every day and have a thorough grasp of it, including colloquialisms and idioms.

To include any other template, simply add the name of the template, e.g. add  if you want to include. A prefix or suffix may be added to template names (e.g.  at the beginning) depending on the local configuration, this can be used to restrict the selection and reduce the length of parameters; for example   could include   if configured in such a way.

Configuration
Babel has six configuration variables which can be modified in.


 * : (string) the path of the language code database file, the default should suffice.


 * : (string) the path of the language name database file, the default should suffice.


 * : (array of string or boolean, indexed by the strings "1", "2", … "5", "N") where each entry is the name of a category for the skill level indicated by its index, possible variable elements are: %code% (language code), %wikiname% (the name of the language in the wiki's content language), and %nativename% (the name of the language in its language). To disable adding a category for a particular level, set the corresponding value to false.


 * For example:


 * will use categories like "Category:User en-0" and "Category:User fr-N". The default is just "Category:Fr-N" and so on.


 * : (string) Name of the main (non-level) category for each language, to which all users of that language are added. Set to false to disable; defaults to format "Category:Fr". It accepts the same format as  above. Example:
 * $wgBabelMainCategory = 'User %code%';


 * : (string) Default ability level to use when none is specified, should be an index from, that is one of the strings "1", "2", … "5", "N". Default is "N".


 * : (boolean) Whether to use the user interface language for the header and footer message. If false (default), it will be in the page content language. This is because using the user interface language may fragment the parser cache.

Several customizations can also be made using MediaWiki namespace messages.


 * MediaWiki:babel-template : The format of template names when one is being included.
 * MediaWiki:babel-portal : The format of the target of the link from the language code.
 * MediaWiki:Babel-autocreate-user : Username to be used for autocreation of Babel related categories
 * MediaWiki:babel-autocreate-text-levels : Text to insert into auto-created categories for different language levels. You have to change this if you want them to be auto-categorized in the main category of the respective language.
 * MediaWiki:babel-autocreate-text-main : Text to insert into auto-created categories for non-level categories. You have to change this if you want them to be auto-categorized in a parent category for all languages.
 * MediaWiki:babel : The header of the babel box
 * MediaWiki:babel-url : The pagename where information on the babel extension can be found
 * MediaWiki:Babel-footer : The footer of the babel box
 * MediaWiki:babel-footer-url : The page to link to in the footer of the babel box