Estinzioni:Babel
Babel Statu dâ rilassu: stàbbili |
|
---|---|
Implementation | Parser function |
Description | Agghiunci na funzioni parser pi nfurmari a l'àutri utenti riguardu li cumpitenzi linguìstichi e catigurizzari a l'utenti chê stissi liveddi e lingui. |
Author(s) | Robert Leverington (RobertLdiscurruta) |
Latest version | Continuous updates |
Compatibility policy | Master maintains backward compatibility. |
MediaWiki | >= 1.43.0 |
Database changes | Yes |
Composer | mediawiki/babel |
Tables | babel |
License | GNU General Public License 2.0 or later |
Download | Included in Language Extension Bundle |
Example | Translatewiki.net |
|
|
Quarterly downloads | 85 (Ranked 57th) |
Public wikis using | 2,416 (Ranked 192nd) |
Translate the Babel extension if it is available at translatewiki.net | |
Issues | Open tasks · Report a bug |
L'estinzioni Babel agghiunci na funzioni parser ca sustituisci lu vecchiu sistema dê Babel cumpletamenti basatu ntê template. Ntô casu ntô quali vinissi spicificata na lingua nun arricanusciuta comu paràmitru, veni ammustratu lu template cô stissu nomu qualora esistissi.
Ntê pruggetti Wikimedia, lu nomu Babel (dô mitu dâ Turri di Babbeli) fa rifirimentu â tabbella, prisenti ntê pàggini Utenti, ca mìranu a na cumunicazzioni multilingui rinnennu chiù fàcili cuntattari a quarchidunu ca canusci na lingua data. L'idìa nascìu nta Wikimedia Commons e fu appoi mplimintata nta tanti àutri pruggetti wiki.
Nstallazzioni
- Download and move the extracted
Babel
folder to yourextensions/
directory.
Developers and code contributors should install the extension from Git instead, using:cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Babel - Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Babel' );
- Run the update script which will automatically create the necessary database tables that this extension needs.
- Configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
- Lu CSS s'attrova ntô file
resources/ext.babel.css
. Si pò canciari lu stili a propiu piacimentu disabbilitànnuli ntâ pàgginaMediaWiki:Common.css
. - If the CLDR extension is found language names are taken from that (where translations are unavailable), otherwise built in MediaWiki language names and English defaults are used.
Usu
La sintassi pâ funzioni parser #babel
è la siguenti:
{{#babel: babelcode1 | babelcode2 | ... }}
Agghiunci unu dê còdici siguenti p'ogni lingua ca parri o capisci siparati di |
. Lu sìmmulu xx
rapprisenta nveci lu còdici lingua MediaWiki sicunnu li standard ISO 639-1 oppuru ISO 639-3. L'usu ginirali p'ogni liveddu di còdici è lu siguenti:
xx-0
- si nun cumprenni pi nenti la lingua.
xx-1
- Abbilità di basi - abbastanti pi capiri matiriali scrivutu o addumannati sìmplici nta sta lingua.
xx-2
- abbilità ntirmedia - sufficienti pô canciamentu o discussioni.
xx-3
- Liveddu avanzatu - puru si arrinesci a scrìviri nta sta lingua senza arcunu prubblema, si putìssiru virificari arcuni errura nichi.
xx-4
- Liveddu "sìmil-nativu" - puru si nun è la tò lingua matri, la tò capacità è sìmili a chidda dûn matrilingua.
xx-5
- Canuscenza prufissiunali.
xx
oxx-N
- Matrilingua c'utilìzzanu un linguaggiu d'ogni jornu e hannu na canuscenza apprufunnuta di chistu, cumprisi li sprissioni culluquiali e li maneri di diri.
P'agghiùnciri àutri template, scrivi simplicimenti lu nomu dô template. P'esempiu, agghiunci User from London
si voi nclùdiri Template:User from London
. Un prifissu o un suffissu pò èssiri agghiunciutu ô nomu dô template (p'es. User
a l'accuminzata) a sicunna dê mpustazzioni lucali. Fari chistu pò ristrìnciri la silizzioni e arridùciri la lunghizza dê paràmitri.
Esempiu: from London
putissi nclùdiri Template:User from London
si fu cunfiguratu nta sta manera.
Parameters
To remove the header and footer, use plain=1
as the first parameter, e.g., {{#babel: plain=1 | babelcode1 | babelcode2 | ... }}
.
This makes it easier to use Babel with other userboxes.
To hide categories, use the nocat=1
parameter as the first parameter, e.g., {{#babel: nocat=1 | babelcode1 | babelcode2 | ... }}
.
Please note that only one of the parameters above is allowed.
At the moment, it is not possible to use both parameters; for example, {{#babel: nocat=1 | plain=1 | babelcode1 | babelcode2 | ... }}
will not work.
Categorization
If categorization is enabled, the extension creates categories using the Babel AutoCreate bot with the text specified in MediaWiki:babel-autocreate-text-levels and MediaWiki:babel-autocreate-text-main. With basic settings, the categories that the bot creates are not categorized, and to fix this, it is recommended to do the following:
- Create a template {{Babel category }} that will generate categories.
- Replacing text on MediaWiki:babel-autocreate-text-levels with
{{Babel category|level=$1|language=$2|ISO=$3}}
- Replacing text on MediaWiki:babel-autocreate-text-main with
{{Babel category|language=$1|ISO=$2}}
This will allow you to categorize categories automatically, and if something happens, you can simultaneously replace the categorization and text in all categories.
Configuration
Configuration parameters
Babel havi sei variàbbili di cunfigurazzioni ca ponnu èssiri canciati n LocalSettings.php
.
$wgBabelLanguageCodesCdb
- ; $var : (stringa) ìnnica lu pircursu (la pusizzioni)dô file ca cunteni lu còdici dâ lingua ntô database. Lu valuri di default avissi a èssiri sufficienti.
$wgBabelLanguageNamesCdb
- (string) the path of the language name database file, the default should suffice.
$wgBabelCategoryNames
- ; $var : (array di stringhi o valura booliani, nnicizzati dê valura "1", "2", … "5", "N"). Ogni valuri mmisu è lu nomu dâ catigurìa ch'idintìfica lu liveddu di cumpitenza nnicatu di l'ìnnici. Elimenti pussìbbili sunnu:
%code%
(còdici dâ lingua),%wikiname%
(nomu dâ lingua ntâ virsioni wiki n cunzidirazzioni), e%nativename%
(dinuminazzioni endònima dâ lingua). Disabbilitari la agghiunciuta di na catigurìa pûn liveddu particulari, mposta lu valuri veru o fàusu currispunnenti.
- P'esempiu:
$wgBabelCategoryNames = [
'0' => 'User %code%-0',
'1' => 'User %code%-1',
'2' => 'User %code%-2',
'3' => 'User %code%-3',
'4' => 'User %code%-4',
'5' => 'User %code%-5',
'N' => 'User %code%-N',
];
- Usa catigurìi comu "Category:User en-0" e "Category:User fr-N". La mpustazzioni pridifinuta è sulu "Category:Fr-N" e accussì via.
$wgBabelMainCategory
- ; $var : (stringa) valuri dâ catigurìa principali (nun lu liveddu) p'ogni lingua â quali vennu agghiunciuti tutti l'utenti ca pàrranu dda lingua n particulari. Pi disabbilitari abbasta mpustari lu valuri supra "false"; Accetta lu stissu furmatu di
$wgBabelCategoryNames
. P'esempiu:$wgBabelMainCategory = 'User %code%';
$wgBabelDefaultLevel
- ; $var : (stringa) Abbilità linguìstica assignata di default quannu nuddu àutru è spicificatu, avissi a èssiri n'ìnnici trattu di
$wgBabelCategoryNames
, ca currispunni a una dê stringhi "1", "2", … "5", "N". Lu valuri di default è "N" zoè matrilingua. $wgBabelUseUserLanguage
- (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.
$wgBabelCategorizeNamespaces
- Array of namespaces to only add automatic categorization to. For example, if
$wgBabelCategorizeNamespaces = [ NS_USER ];
, then Babel will only add categories to pages in the user namespace. The default is null, which means categorizing all namespaces. $wgBabelCategoryOverride
- Whether to allow Babel categories to be overridden on the wiki using MediaWiki:Babel-category-override
$wgBabelAutoCreate
- Whether to auto-create categories.
System messages
Diversi pirsunalizzazzioni ponnu macari èssiri effittuati usannu li missaggi ntô namespace MediaWiki.
- MediaWiki:babel-template "
Template:Utente $1
" - The format of template names when one is being included.
- MediaWiki:babel-portal "
"
- The format of the link's target from the language code. Set to the empty string to not link the language code.
- MediaWiki:Babel-autocreate-user "
Babel AutoCreate
" - Nomu utenti di usari pâ criazzioni autumàtica dê catigurìi Babel
- MediaWiki:babel-autocreate-text-levels "
L'utenti nti sta catigurìa dìciunu ca d'aviri nu liveddu di canuscenza $1 dâ lingua $2.
" - 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 (
$wgBabelMainCategory
). - MediaWiki:babel-autocreate-text-main "
L'utenti n chista catigurìa ìnnicanu lu sò liveddu di canuscenza n $1.
" - 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 "
Nfurmazzioni di Babel supra a l'utenti
" - La ntistazzioni dô box babel Set to
-
to not display a header. - MediaWiki:babel-url "
Project:Babel
" - The page name where information on the babel extension can be found. Set to
-
to display no link in the header. - MediaWiki:Babel-footer "
Utenti pi lingua
" - The footer of the babel box. Set to
-
to not display a footer. - MediaWiki:babel-footer-url "
:Category:Babel - Utenti spartuti pi lingua
" - The page to link to in the footer of the babel box
- MediaWiki:Babel-category-override "
$1
" - Overrides any automatically-generated Babel categories. Parameters:
$1 = the category that would be generated normally.
$2 = the language code
$3 = the babel level.
Any categories overridden using this method will not be auto-created to reduce the risk of vandalism or mistaken edits to that page.
API
meta=babel (bab)
- This module requires read rights.
- Source: Babel
- License: GPL-2.0-or-later
Get information about what languages the user knows
- babuser
User to get information about
- This parameter is required.
- Type: user, by any of username, IP, Temporary user, IP range and interwiki name (e.g. "prefix>ExampleName")
- Get the Babel information for user Example
- api.php?action=query&meta=babel&babuser=Example [open in sandbox]
This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page. |
This extension is included in the following wiki farms/hosts and/or packages: This is not an authoritative list. Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here. Always check with your wiki farms/hosts or bundle to confirm. |
- Stable extensions/scn
- Parser function extensions/scn
- Extensions supporting Composer/scn
- GPL licensed extensions/scn
- Extensions in Wikimedia version control/scn
- CommunityConfigurationProvider initList extensions/scn
- LinksUpdate extensions/scn
- LoadExtensionSchemaUpdates extensions/scn
- ParserFirstCallInit extensions/scn
- UserGetReservedNames extensions/scn
- All extensions/scn
- Extensions used on Wikimedia/scn
- Extensions included in Miraheze/scn
- Extensions included in ShoutWiki/scn
- Extensions included in WikiForge/scn
- Localisation extensions/scn