Difference between revisions of "Template:I18n month"

From Game Detectives Wiki
Jump to: navigation, search
(Created page with "{{#if:{{{2|}}}|<!-- language specific version --> {{#switch: {{ucfirst:{{{1|}}}}} |{{ns:0}} =<!-- Empty, return nothing at all --> | 1|Jan|January ={{MediaWiki:...")
 
(No difference)

Latest revision as of 00:07, 31 May 2018


<templatestyles src="Module:Documentation/styles.css"></templatestyles>
Template documentation[view] [edit] [history] [purge]

This templates allows to render the name of a month (specified through a number between 1 and 12) in the user's preferred language.

Usage

{{I18n month|1=|2=}}

Parameters

Parameter Description Default Status
1= Number (1-12) of the month. Short (like "Jan") and full (like "January") names are also supported. empty Required
2= Language code (only needs to be provided if the language shall be fixed and independent from the user's preferences) Value of {{int:Lang}} Optional
form= Allows specification of grammatical case for the month, for languages that use them. Possible cases:

Also partitive case (ptv), inessive case (ine), elative case (ela) and illative case (ill) cases are supported for Finnish language, in addition to nominative case and genitive case (gen).

nom Optional

Examples

Code Output Notes
{{I18n month|1}} January Month name in the language of the user
{{I18n month|2|de}} Februar German version
{{I18n month|3|fr}}
{{I18n month|3|fr|form=gen}}
mars
mars
Regular and genitive case in language that do not differentiate between them results in identical output
{{I18n month|4|ru}}
{{I18n month|4|ru|form=gen}}
апрель
апреля
Regular and genitive case in language that use uses different cases
{{I18n month|9}}
{{I18n month|Sep}}
{{I18n month|September}}
September
September
September
Alternative month specifications
{{I18n month|6|pl|form=loc}}
{{I18n month|6|cs|form=loc}}
MediaWiki:June-loc/pl
MediaWiki:June-loc/cs
locative case
{{I18n month|7|pl|form=ins}}
{{I18n month|7|cs|form=ins}}
MediaWiki:July-ins/pl
MediaWiki:July-ins/cs
instrumental case
{{I18n month|5}}
{{I18n month|5|fi|form=gen}}
{{I18n month|5|cs|form=ins}}
{{I18n month|5|pl|form=loc}}
May
toukokuun
MediaWiki:May-ins/cs
MediaWiki:May-loc/pl
May uses different code than other months, beceause it has no separate short and long forms in English.