Template:Number to word/doc
|
|
This is a Error creating thumbnail: Unable to save thumbnail to destination documentation Error creating thumbnail: Unable to save thumbnail to destination subpage for Template:Number to word. It contains usage information, Error creating thumbnail: Unable to save thumbnail to destination categories and other content or metadata that is not part of the original template. |
| Error creating thumbnail: Unable to save thumbnail to destination | This template is used in Error creating thumbnail: Unable to save thumbnail to destination MediaWiki:Watchlist-messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own Error creating thumbnail: Unable to save thumbnail to destination user space. The tested changes can then be added in one single edit to this template. Please discuss any changes on the talk page before implementing them. |
Converts a given Error creating thumbnail: Unable to save thumbnail to destination integer into a Error creating thumbnail: Unable to save thumbnail to destination cardinal number or Error creating thumbnail: Unable to save thumbnail to destination ordinal number in the English language. Anything between 10126 and -10126 is supported, as well as some larger numbers such as one centillion and one millinillion.
Usage
{{Number to word|integer[|zero=zero][|adj=on][|us=on][|ord=on]}}
integer: Required. A natural number in the range of 10126 and -10126 is, as well as some larger numbers such as one centillion and one millinillion.
zero: Optional. The value to use when the number is 0. Default is "zero" for cardinal numbers, "zeroth" for ordinal numbers. Can be made empty or, for example, "none", "seed" or "one before the first" as appropriate for the context.
adj: Optional. If the value is "on", the output is hyphenated.
ord: Optional. If the value is "on", the output is an ordinal number, otherwise it is a cardinal number.
us: Optional. If the value is "on", the output of numbers does not include "and" to separate hundreds from smaller values, nor to separate thousands from hundreds. This accords with American usage as described at English numerals.
Examples
| {{Number to word|-999999|adj=on}} | minus Template:Ordinal to word/0 to 999999 |
| {{Number to word|-1001|us=on}} | Template loop detected: Template:Cardinal to word |
| {{Number to word|-235|us=on|adj=on}} | minus Template:Ordinal to word/0 to 999999 |
| {{Number to word|-100}} | Template loop detected: Template:Cardinal to word |
| {{Number to word|-30}} | Template loop detected: Template:Cardinal to word |
| {{Number to word|0|zero=not a sausage|adj=on}} | Template:Ordinal to word/0 to 999999 |
| {{Number to word|30}} | Template loop detected: Template:Cardinal to word |
| {{Number to word|100}} | Template loop detected: Template:Cardinal to word |
| {{Number to word|235|us=on|adj=on}} | Template:Ordinal to word/0 to 999999 |
| {{Number to word|1001}} | Template loop detected: Template:Cardinal to word |
| {{Number to word|999999|adj=on}} | Template:Ordinal to word/0 to 999999 |
| {{Number to word|999999|adj=on|ord=on}} | Template:Ordinal to word/0 to 999999 |
| {{Number to word|9999999999999999}} | {{Number to word}}: value "9999999999999999" is not an integer in the range -999,999 to 999,999
|
See also
- Template:Ordinal to word — does the same job as this template with "ord" set to 1
- Template:Spellnum per MOS — wrapper of this template; applies guidance from Error creating thumbnail: Unable to save thumbnail to destination WP:NUMERAL to determine when a number should be spelled out or not