Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Ordinal: Difference between revisions

Template page
change from 3-level to single-level version in order to avoid template expansion limit
synched en version with en wikipedia +ia version
Line 1: Line 1:
{{LangSwitch
{{LangSwitch
  | lang = {{{lang|}}}
  | lang = {{{lang|}}}
  | en = {{{1}}}{{#ifeq:{{{style|}}}|d|d|{{#ifeq: {{#expr: {{#expr: {{{1}}} mod 100}} round -1}} |10|th|{{#switch:{{#expr:{{{1}}} mod 10}}
| cs = {{{1}}}.
   |1=st
  | en = {{{1}}}<sup>{{#ifeq:{{{style|}}}|d
   |2=nd
  |d
   |3=rd
  |{{#switch:{{#expr:abs({{{1}}}) mod 100}}
   |#default=th
    |11|12|13=th
}} }} }}
    |#default={{#switch:{{#expr:abs({{{1}}}) mod 10}}
  | mk = {{{1}}}-{{#switch:{{#expr:{{{1}}} mod 10}}
      |1=st
      |2=nd
      |3=rd
      |#default=th
      }}
    }}
  }}</sup>
| eo = {{{1}}}-a
| fr = {{#switch: {{lc:{{{style|}}} }}
  |roman={{Roman|{{{1|}}}}}
  |#default={{{1|}}}
}}<sup>{{#ifexpr: {{{1|}}} = 1 | {{#switch: {{{gender}}} | f=ère | m=er |#default=e<!-- avoids agreement error--> }} | e }}</sup>
| ia = {{{1}}}<sup>{{#switch:{{#expr:abs({{{1}}}) mod 10}}
   |1|7  =me
   |2   =nde
   |3   =tie
  |4|5|6=te
  |8    =ve
   |9    =ne
  }}</sup>
  | mk = {{{1}}}-{{#switch:{{#expr:abs({{{1}}}) mod 10}}
   |0|9|5=тиот
   |0|9|5=тиот
   |3|4|6=иот
   |3|4|6=иот
Line 14: Line 34:
   |2    =риот
   |2    =риот
  }}
  }}
  | pl = {{{1}}}-{{#switch:{{#expr:{{{1}}} mod 10}}
| ml = {{{1}}}-മത്തെ
  | pl = {{{1}}}-{{#switch:{{#expr:abs({{{1}}}) mod 10}}
   |1        = {{#switch: {{{gender}}} | f=sza | n=sze |#default=szy}}
   |1        = {{#switch: {{{gender}}} | f=sza | n=sze |#default=szy}}
   |2        = {{#switch: {{{gender}}} | f=ga  | n=gie |#default=gi }}
   |2        = {{#switch: {{{gender}}} | f=ga  | n=gie |#default=gi }}
Line 21: Line 42:
   |#default = {{#switch: {{{gender}}} | f=ta  | n=te  |#default=ty }}
   |#default = {{#switch: {{{gender}}} | f=ta  | n=te  |#default=ty }}
  }}  
  }}  
| fr = {{#switch: {{lc:{{{style|}}} }}
  |roman={{Roman|{{{1|}}}}}
  |#default={{{1|}}}
}}<sup>{{#ifexpr: {{{1|}}} = 1 | {{#switch: {{{gender}}} | f=ère | m=er |#default=e<!-- avoids agreement error--> }} | e }}</sup>
| cs = {{{1}}}.
| ml = {{{1}}}-മത്തെ
  | default = {{{1}}}
  | default = {{{1}}}
}}<noinclude>{{documentation}}</noinclude>
}}<noinclude>
 
{{documentation}}
 
</noinclude>

Revision as of 20:13, 21 April 2011

{{{1}}}th

Template documentation[ view · edit · history · purge ]
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 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

ParameterDescriptionDefaultStatus
1positive integer numberemptyoptional
stylePresentation style. Different options for different languages:
  • In English there is "style=d" adding -d suffixes to all numbers. Used in the legal field (e.g. 3d or 22d) .
{{Ordinal|101|lang=en|style=d}}, for example, produces 101d.
  • In French you can use "style=roman" to display the number (in 1–5,000,000 range) as roman numeral.
{{Ordinal|21|lang=fr}}, for example, produces 21e while {{Ordinal|21|lang=fr|style=roman}} produces Template:Romane.
  • In French you can use "style=roman-title" to display the number as a roman numeral with no suffix except for 1st.
For example, {{Ordinal|1|lang=fr|style=roman-title}} produces 1e but {{Ordinal|3|lang=fr|style=roman-title}} produces 3e.
  • In French you can use "style=pair" to display ordinals for numbers in a pair.
For example, {{Ordinal|1|lang=fr|gender=m|style=pair}} produces 1er but {{Ordinal|2|lang=fr|gender=m|style=pair}} produces 2e.
  • In Tamil you can use "style=trad" to display traditional Tamil ordinals rather than modern Tamil ordinals.
{{Ordinal|1|lang=ta}}, for example, produces 1 while {{Ordinal|1|lang=ta|style=trad}} produces 1.
{{Ordinal|23|lang=ta}}, for example, produces 23 while {{Ordinal|23|lang=ta|style=trad}} produces 23.
emptyoptional
genderGender affects ordinal indicators in several languages, including French and Polish. Genders: m for male, f for female and n for neuter.emptyoptional
langlanguage code of the language in which to display the ordinal number, e.g. en for English, de for German, etc.{{int:Lang}}optional
nosupSet nosup=y to display the ordinals without superscript for links and category names. E.g. 101st instead of 101st.emptyoptional
debugemptyoptional

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

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}} 3-ci
{{Ordinal|21|lang=fr}} 21e
{{Ordinal|21|lang=fr|style=roman}} Template:Romane
{{Ordinal|1|lang=de}} 1
{{Ordinal|87|lang=es|gender=f}} 87
{{Ordinal|87|lang=es|gender=f|nosup=y}} 87


Cookies help us deliver our services. By using our services, you agree to our use of cookies.