Template:plural

From Thesaurus Inscriptionum Raeticarum
Jump to navigationJump to search

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