Template:plural

From Thesaurus Inscriptionum Raeticarum
Revision as of 22:16, 8 March 2014 by Martin Braun (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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
  • "5" when {{#var: n }} = 5
  • "0" when {{#var: n }} = 0
  • "0.0476" when {{#var: n }} = 0.0476
  • "is -1 guinea" when {{#var: n }} = -1
  • "-3" when {{#var: n }} = -3