Template:plural: Difference between revisions
From Thesaurus Inscriptionum Raeticarum
Jump to navigationJump to search
Martin Braun (talk | contribs) No edit summary |
Martin Braun (talk | contribs) No edit summary |
||
Line 14: | Line 14: | ||
[[Category:Text Module]] | [[Category:Text Module]] | ||
</noinclude><includeonly>{{#ifeq: {{{1|}}}|1|{{{2|}}}|{{#ifeq: {{{1|}}}|-1|{{{2|}}}|{{{ | </noinclude><includeonly>{{#ifeq: {{{1|}}}|1|{{{2|}}}|{{#ifeq: {{{1|}}}|-1|{{{2|}}}|{{{3|}}}}}}}</includeonly> |
Latest revision as of 21:17, 8 March 2014
This template serves to display different text according to a given number. It awaits three values: a number, a singular text, and a plural text.
Examples
According to the value of the variable {{#var: n }}
, the code
{{plural|{{#var: n }}|is {{#var: n }} guinea|are {{#var: n }} guineas}}
will display
- "is 1 guinea" when
{{#var: n }}
= 1 - "are 5 guineas" when
{{#var: n }}
= 5 - "are 0 guineas" when
{{#var: n }}
= 0 - "are 0.0476 guineas" when
{{#var: n }}
= 0.0476 - "is -1 guinea" when
{{#var: n }}
= -1 - "are -3 guineas" when
{{#var: n }}
= -3