Global Lua Modules/Plural

Plural module is a small script that replaces {{plural:}}. You can manually set language or the script will parse content page's language.
== ==
== About ==
Most of the languages have the same ruleset for plural logic as English, but others don't.
As the example: French have a little bit different ruleset or Polish, Romanian, Serbian, and Russian have 3 plural forms in total. {{plural:}} magic word can provide only one ruleset on a single page and it's dependent on content page's language.
== ==
; Usage in a template
: 
; Usage in a module
: 
== Examples ==
Code 	Result	Note
{{Plural|0|house|houses}} 	 	Takes $lang parameter from page's language ( for this page).
{{Plural|0|house|houses}} 	 	Takes $lang parameter from page's language ( for this page).
{{Plural|1|house|houses}} 	 	Takes $lang parameter from page's language ( for this page).
{{Plural|2|maison|maisons|lang=fr}}	 	French has a little bit different ruleset
{{Plural|1|maison|maisons|lang=fr}}	 	French has a little bit different ruleset
{{Plural|2|maison|maisons|lang=fr}}	 	French has a little bit different ruleset
{{Plural|-1|house|houses}} 	 	Also works for negative numbers
{{Plural|-2|house|houses}} 	 	Also works for negative numbers
{{Plural|3.14|house|houses}} 	 	Also works for fractional numbers
* 0 {{Plural|0|дом|дома|домов|lang=ru}}
* 1 {{Plural|1|дом|дома|домов|lang=ru}}
* 2 {{Plural|2|дом|дома|домов|lang=ru}}
* 3 {{Plural|3|дом|дома|домов|lang=ru}}
* 4 {{Plural|4|дом|дома|домов|lang=ru}}
* 5 {{Plural|5|дом|дома|домов|lang=ru}}
* 6 {{Plural|6|дом|дома|домов|lang=ru}}
* 7 {{Plural|7|дом|дома|домов|lang=ru}}
* 8 {{Plural|8|дом|дома|домов|lang=ru}}
* 9 {{Plural|9|дом|дома|домов|lang=ru}}
* 10 {{Plural|10|дом|дома|домов|lang=ru}}
* 11 {{Plural|11|дом|дома|домов|lang=ru}}
* 12 {{Plural|12|дом|дома|домов|lang=ru}}
* 13 {{Plural|13|дом|дома|домов|lang=ru}}
* 14 {{Plural|14|дом|дома|домов|lang=ru}}
* 15 {{Plural|15|дом|дома|домов|lang=ru}}
* 16 {{Plural|16|дом|дома|домов|lang=ru}}
* 17 {{Plural|17|дом|дома|домов|lang=ru}}
* 18 {{Plural|18|дом|дома|домов|lang=ru}}
* 19 {{Plural|19|дом|дома|домов|lang=ru}}
* 20 {{Plural|20|дом|дома|домов|lang=ru}}
* 21 {{Plural|21|дом|дома|домов|lang=ru}}
* 22 {{Plural|22|дом|дома|домов|lang=ru}}
* 23 {{Plural|23|дом|дома|домов|lang=ru}}
* 24 {{Plural|24|дом|дома|домов|lang=ru}}
* 25 {{Plural|25|дом|дома|домов|lang=ru}}	
* 0 
* 1 
* 2 
* 3 
* 4 
* 5 
* 6 
* 7 
* 8 
* 9 
* 10 
* 11 
* 12 
* 13 
* 14 
* 15 
* 16 
* 17 
* 18 
* 19 
* 20 
* 21 
* 22 
* 23 
* 24 
* 25	Russian language have complex ruleset:
# If the amount of items ends with 1, but is not ended with 11, then use the first form.
# If the amount of items ends with 2, 3, or 4, but is not ended with 12, 13, or 14, then use the second form.
# Otherwise, use the third form.