Template:Ordinal: Difference between revisions
Template page
More actions
No edit summary |
add genre option |
||
| Line 1: | Line 1: | ||
{{ordinal/{{Fallback|ordinal}} | {{ordinal/{{Fallback|ordinal}} | ||
|1={{{1|}}} | |1={{{1|}}} | ||
| | |genre={{{genre|}}} | ||
}}<noinclude>{{documentation}}</noinclude> | }}<noinclude>{{documentation}}</noinclude> | ||
Revision as of 07:59, 6 October 2010
This documentation is transcluded from Template:Ordinal/doc.
This template will add the appropriate ordinal suffix to a given integer.
{{Ordinal|101}}, for example, produces Template:Ordinal/en.
In English version, for an integer ending in 2 or 3 (except for integers ending in 12 or 13), the ordinal suffix will be -nd and -rd, respectively.
Usage
{{Ordinal |1= |debug= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | positive integer number | empty | optional | |
style | Presentation style. Different options for different languages:
| empty | optional | |
gender | Gender affects ordinal indicators in several languages, including French and Polish. Genders: m for male, f for female and n for neuter. | empty | optional | |
lang | language code of the language in which to display the ordinal number, e.g. en for English, de for German, etc. | {{int:Lang}} | optional | |
nosup | Set nosup=y to display the ordinals without superscript for links and category names. E.g. Template:Ordinal/en instead of Template:Ordinal/en. | empty | optional | |
debug | empty | optional | ||
Additional information
The template is intended to be used in the following namespaces: all namespaces
The template is intended to be used by the following user groups: all users
Relies on:
Module:Ordinal
See also
- Module:Ordinal
- Module:I18n/ordinal — translations and ordinal formatting schemes used by Module:Ordinal
Examples
| Code | Result |
|---|---|
{{Ordinal|101}} |
Template:Ordinal/en |
{{Ordinal|102}} |
Template:Ordinal/en |
{{Ordinal|103}} |
Template:Ordinal/en |
{{Ordinal|104}} |
Template:Ordinal/en |
{{Ordinal|1|lang=en}} |
Template:Ordinal/en |
{{Ordinal|1|lang=en|style=d}} |
Template:Ordinal/en |
{{Ordinal|3|lang=pl}} |
Template:Ordinal/en |
{{Ordinal|21|lang=fr}} |
Template:Ordinal/en |
{{Ordinal|21|lang=fr|style=roman}} |
Template:Ordinal/en |
{{Ordinal|1|lang=de}} |
Template:Ordinal/en |
{{Ordinal|87|lang=es|gender=f}} |
Template:Ordinal/en |
{{Ordinal|87|lang=es|gender=f|nosup=y}} |
Template:Ordinal/en |