Template:Ordinal/doc: Difference between revisions
Template page
More actions
Add Spanish and German examples |
Expand docs |
||
| Line 41: | Line 41: | ||
|i18n-mediawiki-msg= | |i18n-mediawiki-msg= | ||
|seealso= | |seealso= | ||
* [[Module:Ordinal]] | |||
* [[Module:I18n/ordinal]] — translations and ordinal formatting schemes used by Module:Ordinal | |||
|setscats= | |setscats= | ||
|lines=1 | |lines=1 | ||
|shorthand= | |shorthand= | ||
|relieson= | |relieson=[[Module:Ordinal]] | ||
}} | }} | ||
==Examples== | ==Examples== | ||
| Line 59: | Line 61: | ||
| <code><nowiki>{{Ordinal|104}}</nowiki></code> || {{Ordinal|104}} | | <code><nowiki>{{Ordinal|104}}</nowiki></code> || {{Ordinal|104}} | ||
|- | |- | ||
| <code><nowiki>{{Ordinal| | | <code><nowiki>{{Ordinal|1|lang=en}}</nowiki></code> || {{Ordinal|1|lang=en|}} | ||
|- | |- | ||
| <code><nowiki>{{Ordinal| | | <code><nowiki>{{Ordinal|1|lang=en|style=d}}</nowiki></code> || {{Ordinal|1|lang=en|style=d}} | ||
|- | |||
| <code><nowiki>{{Ordinal|3|lang=pl}}</nowiki></code> || {{Ordinal|103|lang=pl}} | |||
|- | |||
| <code><nowiki>{{Ordinal|21|lang=fr}}</nowiki></code> || {{Ordinal|21|lang=fr}} | |||
|- | |- | ||
| <code><nowiki>{{Ordinal|21|lang=fr|style=roman}}</nowiki></code> || {{Ordinal|21|lang=fr|style=roman}} | | <code><nowiki>{{Ordinal|21|lang=fr|style=roman}}</nowiki></code> || {{Ordinal|21|lang=fr|style=roman}} | ||
| Line 68: | Line 74: | ||
|- | |- | ||
| <code><nowiki>{{Ordinal|87|lang=es|gender=f}}</nowiki></code> || {{Ordinal|87|lang=es|gender=f}} | | <code><nowiki>{{Ordinal|87|lang=es|gender=f}}</nowiki></code> || {{Ordinal|87|lang=es|gender=f}} | ||
|- | |||
| <code><nowiki>{{Ordinal|87|lang=es|gender=f|nosup=y}}</nowiki></code> || {{Ordinal|87|lang=es|gender=f|nosup=y}} | |||
|} | |} | ||
Revision as of 03:54, 30 December 2014
This template will add the appropriate ordinal suffix to a given integer.
{{Ordinal|101}}, for example, produces 101st.
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 | {{int:Lang}} | optional | |
nosup | Set nosup=y to display the ordinals without superscript for links and category names. E.g. 101st instead of 101st. | 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}} |
101st |
{{Ordinal|102}} |
102nd |
{{Ordinal|103}} |
103rd |
{{Ordinal|104}} |
104th |
{{Ordinal|1|lang=en}} |
1st |
{{Ordinal|1|lang=en|style=d}} |
1d |
{{Ordinal|3|lang=pl}} |
103‑ci |
{{Ordinal|21|lang=fr}} |
21e |
{{Ordinal|21|lang=fr|style=roman}} |
XXIe |
{{Ordinal|1|lang=de}} |
1. |
{{Ordinal|87|lang=es|gender=f}} |
87.a |
{{Ordinal|87|lang=es|gender=f|nosup=y}} |
87a |