Difference between revisions of "Plural/Mediawiki plural rules"

From translatewiki.net
Jump to navigation Jump to search
(add languages)
Line 150: Line 150:
 
|-
 
|-
 
| [[Portal:Cy|{{#languagename:cy}}]] || cy || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageCy.php;hb=HEAD Rule Q] || 0<br /> 1<br /> 2<br /> 3<br /> 6<br /> other || 0<br /> 1<br /> 2<br /> 3<br /> 6<br /> 4, 5, 7, 8... ||
 
| [[Portal:Cy|{{#languagename:cy}}]] || cy || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageCy.php;hb=HEAD Rule Q] || 0<br /> 1<br /> 2<br /> 3<br /> 6<br /> other || 0<br /> 1<br /> 2<br /> 3<br /> 6<br /> 4, 5, 7, 8... ||
  +
|-
  +
| [[Portal:Da|{{#languagename:da}}]] || da || || Default || ||
  +
|-
  +
| [[Portal:De|{{#languagename:de}}]] || de || || Default || ||
  +
|-
  +
| [[Portal:Diq|{{#languagename:diq}}]] || diq || || Default || ||
 
|-
 
|-
 
| [[Portal:Dsb|{{#languagename:dsb}}]] || dsb || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageDsb.php;hb=HEAD Rule] || || ||
 
| [[Portal:Dsb|{{#languagename:dsb}}]] || dsb || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageDsb.php;hb=HEAD Rule] || || ||
  +
|-
  +
| [[Portal:Dtp|{{#languagename:dtp}}]] || dtp || || Default || ||
  +
|-
  +
| [[Portal:Dv|{{#languagename:dv}}]] || dv || || Default || ||
  +
|-
  +
| [[Portal:Dz|{{#languagename:dz}}]] || dz || || Default || ||
  +
|-
  +
| [[Portal:Ee|{{#languagename:ee}}]] || ee || || Default || ||
  +
|-
  +
| [[Portal:Egl|{{#languagename:egl}}]] || egl || || Default || ||
  +
|-
  +
| [[Portal:El|{{#languagename:el}}]] || el || || Default || ||
  +
|-
  +
| [[Portal:Eml|{{#languagename:eml}}]] || eml || || Default || ||
 
|-
 
|-
 
| [[Portal:En|{{#languagename:en}}]] || en || || 1<br /> other || 1<br /> 0, 2, 3... ||
 
| [[Portal:En|{{#languagename:en}}]] || en || || 1<br /> other || 1<br /> 0, 2, 3... ||
 
|-
 
|-
 
| [[Portal:Eo|{{#languagename:eo}}]] || eo || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageEo.php;hb=HEAD default] || Default || ||
 
| [[Portal:Eo|{{#languagename:eo}}]] || eo || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageEo.php;hb=HEAD default] || Default || ||
  +
|-
  +
| [[Portal:Es|{{#languagename:es}}]] || es || || Default || ||
  +
|-
  +
| [[Portal:Esu|{{#languagename:esu}}]] || esu || || Default || ||
 
|-
 
|-
 
| [[Portal:Et|{{#languagename:et}}]] || et || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageEt.php;hb=HEAD default] || Default || ||
 
| [[Portal:Et|{{#languagename:et}}]] || et || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageEt.php;hb=HEAD default] || Default || ||
  +
|-
  +
| [[Portal:Eu|{{#languagename:eu}}]] || eu || || Default || ||
  +
|-
  +
| [[Portal:Ext|{{#languagename:ext}}]] || ext || || Default || ||
  +
|-
  +
| [[Portal:Fa|{{#languagename:fa}}]] || fa || || Default || ||
  +
|-
  +
| [[Portal:Ff|{{#languagename:ff}}]] || ff || || Default || ||
 
|-
 
|-
 
| [[Portal:Fi|{{#languagename:fi}}]] || fi || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageFi.php;hb=HEAD default] || Default || ||
 
| [[Portal:Fi|{{#languagename:fi}}]] || fi || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageFi.php;hb=HEAD default] || Default || ||
  +
|-
  +
| [[Portal:Fit|{{#languagename:fit}}]] || fit || || Default || ||
  +
|-
  +
| [[Portal:Fj|{{#languagename:fj}}]] || fj || || Default || ||
  +
|-
  +
| [[Portal:Fo|{{#languagename:fo}}]] || fo || || Default || ||
 
|-
 
|-
 
| [[Portal:Fr|{{#languagename:fr}}]] || fr || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageFr.php;hb=HEAD one-zero] || <=1<br /> other || 0, 1<br /> 2, 3... ||
 
| [[Portal:Fr|{{#languagename:fr}}]] || fr || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageFr.php;hb=HEAD one-zero] || <=1<br /> other || 0, 1<br /> 2, 3... ||
  +
|-
  +
| [[Portal:Frc|{{#languagename:frc}}]] || frc || || Default || ||
  +
|-
  +
| [[Portal:Frp|{{#languagename:frp}}]] || frp || || Default || ||
  +
|-
  +
| [[Portal:Frr|{{#languagename:frr}}]] || frr || || Default || ||
  +
|-
  +
| [[Portal:Fur|{{#languagename:fur}}]] || fur || || Default || ||
  +
|-
  +
| [[Portal:Fy|{{#languagename:fy}}]] || fy || || Default || ||
 
|-
 
|-
 
| [[Portal:Ga|{{#languagename:ga}}]] || ga || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGa.php;hb=HEAD Rule H] || 1<br /> 2<br /> 3..6<br /> 7..10<br /> other || 1<br /> 2<br /> 3..6<br /> 7..10<br /> 11, 12... ||
 
| [[Portal:Ga|{{#languagename:ga}}]] || ga || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGa.php;hb=HEAD Rule H] || 1<br /> 2<br /> 3..6<br /> 7..10<br /> other || 1<br /> 2<br /> 3..6<br /> 7..10<br /> 11, 12... ||
  +
|-
  +
| [[Portal:Gag|{{#languagename:gag}}]] || gag || || Default || ||
  +
|-
  +
| [[Portal:Gah|{{#languagename:gah}}]] || gah || || Default || ||
 
|-
 
|-
 
| [[Portal:Gan|{{#languagename:gan}}]] || gan || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGan.php;hb=HEAD default] || Default || ||
 
| [[Portal:Gan|{{#languagename:gan}}]] || gan || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGan.php;hb=HEAD default] || Default || ||
  +
|-
  +
| [[Portal:Gbz|{{#languagename:gbz}}]] || gbz || || Default || ||
  +
|-
  +
| [[Portal:Gcf|{{#languagename:gcf}}]] || gcf || || Default || ||
 
|-
 
|-
 
| [[Portal:Gd|{{#languagename:gd}}]] || gd || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGd.php;hb=HEAD Rule X] || 1<br /> 2<br /> 11<br /> 12<br /> 3..10, 13..19<br /> 0, 20.. || 1<br /> 2<br /> 11<br /> 12<br /> 3..10, 13..19<br /> 0, 20.. ||
 
| [[Portal:Gd|{{#languagename:gd}}]] || gd || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGd.php;hb=HEAD Rule X] || 1<br /> 2<br /> 11<br /> 12<br /> 3..10, 13..19<br /> 0, 20.. || 1<br /> 2<br /> 11<br /> 12<br /> 3..10, 13..19<br /> 0, 20.. ||
  +
|-
  +
| [[Portal:Gl|{{#languagename:gl}}]] || gl || || Default || ||
  +
|-
  +
| [[Portal:Glk|{{#languagename:glk}}]] || glk || || Default || ||
  +
|-
  +
| [[Portal:Gn|{{#languagename:gn}}]] || gn || || Default || ||
  +
|-
  +
| [[Portal:Gom|{{#languagename:gom}}]] || gom || || Default || ||
  +
|-
  +
| [[Portal:Got|{{#languagename:got}}]] || got || || Default || ||
  +
|-
  +
| [[Portal:Grc|{{#languagename:grc}}]] || grc || || Default || ||
  +
|-
  +
| [[Portal:Gsw|{{#languagename:gsw}}]] || gsw || || Default || ||
  +
|-
  +
| [[Portal:Gu|{{#languagename:gu}}]] || gu || || Default || ||
  +
|-
  +
| [[Portal:Guc|{{#languagename:guc}}]] || guc || || Default || ||
  +
|-
  +
| [[Portal:Gur|{{#languagename:gur}}]] || gur || || Default || ||
 
|-
 
|-
 
| [[Portal:Gv|{{#languagename:gv}}]] || gv || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGv.php;hb=HEAD Rule] || || ||
 
| [[Portal:Gv|{{#languagename:gv}}]] || gv || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageGv.php;hb=HEAD Rule] || || ||
  +
|-
  +
| [[Portal:Ha|{{#languagename:ha}}]] || ha || || Default || ||
 
|-
 
|-
 
| [[Portal:He|{{#languagename:he}}]] || he || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageHe.php;hb=HEAD Rule] || 1<br /> 2<br /> other || 1<br /> 2<br /> 0, 3.. ||
 
| [[Portal:He|{{#languagename:he}}]] || he || [https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=languages/classes/LanguageHe.php;hb=HEAD Rule] || 1<br /> 2<br /> other || 1<br /> 2<br /> 0, 3.. ||

Revision as of 18:14, 2 April 2012

This page is a draft and may contain errors. Contributions welcome.

The table shows the MediaWiki plural rules for all languages enabled for localisation at translatewiki.net.

The default rules are those for English, with one form for the number 1 and another for all other numbers.

At present Mediawiki does not have rules for decimal numbers.??????

Follow the link in the group column to view the code in its language.php file (index of all language.php files).

Language Code Group Rules Examples Notes
Afar aa Default
Abkhazian ab Default
Achinese ace Default
Adyghe ady Default
Tunisian Arabic aeb Default
Afrikaans af Default
Akan ak Default
Alabama akz Default
Gheg Albanian aln Default
Tosk als Default
Amharic am one-zero <=1
other
0, 1
2, 3...
Aragonese an Default
Old English ang Default
Angika anp Default
Arabic ar arabic 0
1
2
mod 100 in 3..10
mod 100 in 11..99
other
0
1
2
3..10, 103..110, 203..210...
11..99, 111..199, 211..299...
100..102, 200..202, 300..302...
Aramaic arc Default
Mapuche arn Default
Araona aro Default
Algerian Arabic arq Default
Moroccan Arabic ary Default
Egyptian Arabic arz Default
Assamese as Default
Asturian ast Default
Avaric av Default
Kotava avk Default
Aymara ay Default
Azerbaijani az zero other 0, 1...
Bashkir ba Default
Bavarian bar Default
Batak Toba bbc Default
Southern Balochi bcc Default
Central Bikol bcl Default
Belarusian be Rule K n mod 10 is 1 and n mod 100 is not 11
n mod 10 in 2..4 and n mod 100 not in 12..14
n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14
1, 21, 31, 41, 51, 61...
2-4, 22-24, 32-34...
0, 5-20, 25-30, 35-40...
1
Betawi bew Default
Badaga bfq Default
Bulgarian bg default Default
Bhojpuri bho one-zero <=1
other
0, 1
2, 3...
Bislama bi Default
Banjar bjn Default
Bambara bm Default
Bangla bn Default
Tibetan bo Default
Bishnupriya bpy Default
Bakhtiari bqi Default
Breton br Default
Brahui brh Default
Bosnian bs Rule
Iriga Bicolano bto Default
Buginese bug Default
Russia Buriat bxr Default
Catalan ca Default
Chavacano cbk-zam Default
Min Dong Chinese cdo Default
Chechen ce Default
Cebuano ceb Default
Chamorro ch Default
Choctaw cho Default
Cherokee chr Default
Cheyenne chy Default
Central Kurdish ckb Default
Corsican co Default
Capiznon cps Default
Cree cr Default
Crimean Turkish crh Default
Czech cs Rule
Kashubian csb Default
Church Slavic cu Rule
Chuvash cv Default
Welsh cy Rule Q 0
1
2
3
6
other
0
1
2
3
6
4, 5, 7, 8...
Danish da Default
German de Default
Zazaki diq Default
Lower Sorbian dsb Rule
Central Dusun dtp Default
Divehi dv Default
Dzongkha dz Default
Ewe ee Default
Emilian egl Default
Greek el Default
Emiliano-Romagnolo eml Default
English en 1
other
1
0, 2, 3...
Esperanto eo default Default
Spanish es Default
Central Yupik esu Default
Estonian et default Default
Basque eu Default
Extremaduran ext Default
Persian fa Default
Fulah ff Default
Finnish fi default Default
Tornedalen Finnish fit Default
Fijian fj Default
Faroese fo Default
French fr one-zero <=1
other
0, 1
2, 3...
Cajun French frc Default
Arpitan frp Default
Northern Frisian frr Default
Friulian fur Default
Western Frisian fy Default
Irish ga Rule H 1
2
3..6
7..10
other
1
2
3..6
7..10
11, 12...
Gagauz gag Default
Alekano gah Default
Gan Chinese gan default Default
Zoroastrian Dari gbz Default
Guadeloupean Creole French gcf Default
Scottish Gaelic gd Rule X 1
2
11
12
3..10, 13..19
0, 20..
1
2
11
12
3..10, 13..19
0, 20..
Galician gl Default
Gilaki glk Default
Guarani gn Default
Goan Konkani gom Default
Gothic got Default
Ancient Greek grc Default
Swiss German gsw Default
Gujarati gu Default
Wayuu guc Default
Frafra gur Default
Manx gv Rule
Hausa ha Default
Hebrew he Rule 1
2
other
1
2
0, 3..
Hindi hi one-zero <=1
other
0, 1
2, 3...
Croatian hr Rule
Upper Sorbian hsb Rule
Hungarian hu default Default
Armenian hy one-zero <=1
other
0, 1
2, 3...
Inuktitut iu default Default
Japanese ja default Default
Kara-Kalpak kaa default Default
Kazakh kk default Default
Khmer km default Default
Colognian ksh Rule U 0
1
other
0
1
2, 3, 4...
Kurdish ku default Default
Latin la default Default
Lingala ln one-zero <=1
other
0, 1
2, 3...
Lithuanian lt Rule J n mod 10 is 1 and n mod 100 not in 11..19
n mod 10 in 2..9 and n mod 100 not in 11..19
other
1, 21, 31...
2-9, 22-29, 32-39...
0, 10-20, 30, 40...
1
Latvian lv Rule F 0
n mod 10 is 1 and n mod 100 is not 11
other
0
1, 21, 31..
2..10, 12..20, 22...
Malagasy mg one-zero <=1
other
0, 1
2, 3...
Macedonian mk Rule n mod 10 is 1 and n mod 100 is not 11
other
1, 21, 31, ... 101, 121...
0, 2, 3...
Malayalam ml default Default
Moldovan mo Rule I 1
n is 0 OR n is not 1 AND n mod 100 in 1..19
other
1
0, 2..19, 101..119, 201..
20..100, 120..
Maltese mt Rule O 1
n is 0 or n mod 100 in 2..10
n mod 100 in 11..19
other
1
0, 2-10, 102-110, 202-210...
11-19, 111-119, 211-219...
20-101, 120-201, 220-301...
Burmese my default Default
Northern Sotho nso one-zero <=1
other
0, 1
2, 3...
Ossetic os default Default
Polish pl Rule
Romanian ro Rule I 1
n is 0 OR n is not 1 AND n mod 100 in 1..19
other
1
0, 2..19, 101..119, 201..
20..100, 120..
Russian ru Rule K n mod 10 is 1 and n mod 100 is not 11
n mod 10 in 2..4 and n mod 100 not in 12..14
n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14
1, 21, 31, 41, 51, 61...
2-4, 22-24, 32-34...
0, 5-20, 25-30, 35-40...
1
Northern Sami se has-dual 1
2
other
1
2
0, 3, 4...
Samogitian sgs Rule
Serbo-Croatian sh Rule 1
Tachelhit shi default Default
Slovak sk Rule L 1
2..4
other
1
2, 3, 4
0, 5, 6...
Slovenian sl Rule N n mod 100 is 1
n mod 100 is 2
n mod 100 in 3..4
other
1, 101, 201, 301, 401...
2, 102, 202, 302, 402...
3, 4, 103, 104, 203, 204...
0, 5-100, 105-200...
Southern Sami sma has-dual 1
2
other
1
2
0, 3, 4...
Serbian sr Rule K n mod 10 is 1 and n mod 100 is not 11
n mod 10 in 2..4 and n mod 100 not in 12..14
n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14
1, 21, 31, 41, 51, 61...
2-4, 22-24, 32-34...
0, 5-20, 25-30, 35-40...
1
Tajik tg default Default
Tigrinya ti one-zero <=1
other
0, 1
2, 3...
Tagalog tl one-zero <=1
other
0, 1
2, 3...
Turkish tr default Default
Tuvinian tyv default Default
Ukrainian uk Rule K n mod 10 is 1 and n mod 100 is not 11
n mod 10 in 2..4 and n mod 100 not in 12..14
n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14
1, 21, 31, 41, 51, 61...
2-4, 22-24, 32-34...
0, 5-20, 25-30, 35-40...
1
Cantonese yue default Default
Chinese zh default Default
Walloon wa one-zero <=1
other
0, 1
2, 3...

Note 1: An alternative ruleset has been defined for this language, with 2 forms; n is 1 and n is not 1.