Template:thecardinal

Definition from Wiktionary, the free dictionary
Jump to: navigation, search

|1=one|2=two|3=three|4=four|5=five
|6=six|7=seven|8=eight|9=nine|10=ten
|11=eleven|12=twelve|13=thirteen|14=fourteen|15=fifteen
|#default={{{1}}}


The following documentation is located at Template:thecardinal/documentation. [edit]
Useful links: subpage listtransclusionsredirects

Given a number, this template automatically generates an English word for a cardinal.

Usage

This template uses only one parameter, which is the number (written with Hindu-Arabic digits) to be converted.

Examples

  • {{thecardinal|1}} returns:
    one
  • {{thecardinal|9}} returns:
    nine

Mechanics

This template simply employs the parser function #switch to keep a list of numbers in algarisms and their ordinal words. Consequently, this list should contain all the relevant number before they are converted elsewhere.

If a user tries to convert a set characters that is not in the list, the final result is simply the same set of characters. (For example, {{thecardinal|qwerty}} merely returns "qwerty".)

See also