Jump to content

Module talk:ConvertNumeric

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Dcoetzee (talk | contribs) at 08:06, 24 February 2013. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

numeral_to_english

Converts a given integer to its English text representation. Accepts integers (including negative and zero), decimal numbers, and scientific notation. Any value with magnitude less than 1000 vigintillion (1066) is supported.

{{#invoke:ConvertNumeric | numeral_to_english | -123456789.25 }}

Negative one hundred twenty-three million four hundred fifty-six thousand seven hundred and eighty-nine point two five

{{#invoke:ConvertNumeric | numeral_to_english | 5E30 | case=u | ord=on | lk=on }}

Five nonillionth

{{#invoke:ConvertNumeric | numeral_to_english | 57000 | round=on | plural=on}}

sixty thousands

Optional parameters:

  • case: Set to "U" or "u" to capitalize result
  • sp: Set to "us" to remove "and" between hundreds and tens places
  • adj: Hyphenate
  • ord: Ordinal (e.g. first instead of one)
  • pl: Plural
  • lk: If set to 'on', will link the words "billion" and larger to their respective short-scale article sections. This might be helpful for disambiguation. Subsets of words can be linked to by specifying them, e.g. lk=trillion will link only "trillion", and lk=trillion,quadrillion will link only those two.
  • negative: Sets the word to use for negative if the supplied value is negative (e.g. negative or minus)
  • round: If set to 'on', will round the number to the nearest one- or two-word integer. |round=down and |round=up are similar but round down and up respectively.