Template:plural: Difference between revisions

From Thesaurus Inscriptionum Raeticarum
Jump to navigationJump to search
No edit summary
(No difference)

Revision as of 21:16, 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
  • "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