This correctly format the combination of a month name and a year number according to the language code passed in parameter, or (if it's not defined or empty) according to the page content language, or (not recommanded) the user language if the page has no defined content language.
Then the actual language used will depend on fallback languages supported by the
#time: parser function if the language selected above has no specific support, and it may fallback to the English format.
The two positional parameters, normally required, are the month number, and the year number (in Gregorian calendar), in that order.
lang parameter is optional, if it is set, it should be a standard language code supported by MediaWiki translations
This template uses special code to generate the appropriate format to use with
#time:, as some languages need different separators or order of elements (such as Korean, Japanese and Chinese), or need a different year numbering (such as Thai not using the chistian era), or some complex number format for years (such as Latin, using Roman numbers written with capital Latin letters).
#time automatically supports the conversion of numbers using national digits (such as those used in Arabic, Persian by default, not in Hebrew, or in most Indic scripts).
The order of elements is month then year for most languages, including in RTL scripts (the month name will be displayed to the right, i.e. still at the begining of the returned string). except Korean, Japanese and Chinese (and the numeric-only ISO 8601 format YYYY-MM with ASCII digits, a format not generated here as it is not used natively in any language).
As of now, only 6 languages require specific formats not matching the default format "
F Y" used for most languages, these are: Hungarian (hu), Latin (la), Thai (th), Korean (ko), Japanese (ja) and Chinese (zh), and their script variants (or languages falling back to them).
The template will work also when the user language is set dynamically (it should not alter the format of digits, unless this language is the actual language used).
Some languages may be supported without still having enough resources to translate their month names, so these languages may still display month names in English: you fix that by helping localizing MediaWiki on Translatewiki.net ; at least all supported languages with a localized version of a Wikimedia wiki project are supported to be able to insert dates with user signatures in talk pages).
- Using by default the page content language (or the user language if it's not available, as in this documentation)
: January 2014
- Some LTR languages using the default format "F Y" (with ASCII digits)
- with lang=en (English): January 2014
- with lang=fr (French): Janvier 2014
- with lang=el (Greek): Ιανουάριος 2014
- with lang=ru (Russian): Январь 2014
- with lang=bg (Bulgarian): Януари 2014
- with lang=sr (Serbian): Јануар 2014
- with lang=hy (Armenian): Հունվար 2014
- with lang=ka (Georgian): იანვარი 2014
- with lang=ta (Tamil): ஜனவரி 2014 (traditional Tamil numbers (not decimal digits as there's no zero) exist too, but are not used here with the Gregorian era)
- with lang=te (Telugu): జనవరి 2014 (FIXME: traditional Telugu decimal digits exist too, but are not used here with the Gregorian era)
- with lang=ml (Malayalam): ജനുവരി 2014 (FIXME:traditional Malayalam decimal digits exist too, but are not used here with the Gregorian era)
- with lang=am (Amharic): ጃንዩዌሪ 2014
- with lang=iu (Inuktitut): ᔭᓐᓄᐊᓕ 2014
- Some LTR languages using national digits (but still not requiring special formats)
- with lang=hi (Hindi): जनवरी २०१४
- with lang=ne (Nepali): जनवरी २०१४
- with lang=as (Assamese): জানুৱাৰী ২০১৪
- with lang=bn (Bangla): জানুয়ারি ২০১৪
- with lang=pa (Punjabi): ਜਨਵਰੀ 2014
- with lang=gu (Gujarati): જાન્યુઆરી ૨૦૧૪
- with lang=or (Odia): ଜାନୁଆରୀ ୨୦୧୪
- with lang=kn (Kannada): ಜನವರಿ ೨೦೧೪
- with lang=km (Khmer): ខែមករា ២០១៤
- with lang=lo (Lao): ມັງກອນ ໒໐໑໔
- with lang=bo (Tibetan): ཟླ་བ་དང་པོ། ༢༠༡༤
- with lang=dz (Dzongkha): སྤྱི་ཟླ་དང་པ། ༢༠༡༤
- Some RTL languages (still using ASCII digits and same format, read in logical order)
- with lang=he (Hebrew): ינואר 2014 (traditional Hebrew decimal digits exist too, but are not used here with the Gregorian era)
- with lang=yi (Yiddish): יאַנואַר 2014 (traditional Hebrew decimal digits exist too, but are not used here with the Gregorian era)
- with lang=ur (Urdu): جنوری 2014 (FIXME: traditional Perso-Arabic decimal digits exist too, but are not used with the Gregorian era)
- with lang=ps (Pashto): جنوري ۲۰۱۴ (FIXME: traditional Perso-Arabic decimal digits exist too, but are not used with the Gregorian era)
- with lang=dv (Divehi): ޖަނަވަރީ 2014
- Some RTL languages using also national digits (but still not requiring special formats)
- with lang=ar (Arabic): يناير ٢٠١٤
- with lang=fa (Persian): ژانویه ۲۰۱۴
- Some LTR languages needing with special year numbering format
- with lang=la (Latin): Ianuarius 2014 (this should use Roman numbers)
- with lang=th (Thai): มกราคม 2014 (FIXME: traditional Thai decimal digits exist too and should probably be used for the traditional era, but ASCII digits are used like with the Gregorian era. Using ASCII digits for year numbering in the traditional Thai calendar currently matches the practice in Thai Wikipedia, but it may contradict usage in other Thai medias and could create confusion for historical dates in the 16th Gregorian century or before, if the era is not explicitly specified.)
- Some LTR languages needing with special formats requiring specific suffixes for year, possibly without separator, and with different logical order (but that can still be using ASCII digits with these suffixes)
- with lang=hu (Hungarian): Január 2014
- with lang=ko (Korean): 1월 2014 (traditional sinographic numbers (not decimal digits) exist too, but are not used here with the Gregorian era)
- with lang=ja (Japanese): 1月 2014 (traditional sinographic numbers (not decimal digits) exist too, but are not used here with the Gregorian era)
- with lang=zh (Chinese): 1月 2014 (traditional sinographic numbers (not decimal digits) exist too, but are not used here with the Gregorian era)
- with lang=zh-hant (Traditional Chinese): 1月 2014 (traditional sinographic numbers (not decimal digits) exist too, but are not used here with the Gregorian era)
|The above documentation is transcluded from Template:Month/doc. (edit | history)|
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Please add categories to the /doc subpage. Subpages of this template.