<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="vi">
	<id>https://bktt.vn/index.php?action=history&amp;feed=atom&amp;title=M%C3%B4_%C4%91un%3AMonth_translator%2Fdata</id>
	<title>Mô đun:Month translator/data - Lịch sử thay đổi</title>
	<link rel="self" type="application/atom+xml" href="https://bktt.vn/index.php?action=history&amp;feed=atom&amp;title=M%C3%B4_%C4%91un%3AMonth_translator%2Fdata"/>
	<link rel="alternate" type="text/html" href="https://bktt.vn/index.php?title=M%C3%B4_%C4%91un:Month_translator/data&amp;action=history"/>
	<updated>2026-06-02T05:29:28Z</updated>
	<subtitle>Lịch sử thay đổi của trang này ở wiki</subtitle>
	<generator>MediaWiki 1.35.0</generator>
	<entry>
		<id>https://bktt.vn/index.php?title=M%C3%B4_%C4%91un:Month_translator/data&amp;diff=275&amp;oldid=prev</id>
		<title>Tttrung: Tạo trang mới với nội dung “ --[[--------------------------&lt; L A N G U A G E S &gt;------------------------------------------------------------  Table of ISO 639 codes for languages sup…”</title>
		<link rel="alternate" type="text/html" href="https://bktt.vn/index.php?title=M%C3%B4_%C4%91un:Month_translator/data&amp;diff=275&amp;oldid=prev"/>
		<updated>2020-10-02T02:29:34Z</updated>

		<summary type="html">&lt;p&gt;Tạo trang mới với nội dung “ --[[--------------------------&amp;lt; L A N G U A G E S &amp;gt;------------------------------------------------------------  Table of ISO 639 codes for languages sup…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Trang mới&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
--[[--------------------------&amp;lt; L A N G U A G E S &amp;gt;------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Table of ISO 639 codes for languages supported by this module.    List of MediaWiki supported languages and their&lt;br /&gt;
codes can be found at: Template:Citation_Style_documentation/language/doc&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local langs = {'ca', 'de', 'es', 'fi', 'fr', 'it', 'pl', 'pt', 'ru', 'sv'};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; E N G L I S H   M O N T H   N A M E S &amp;gt;----------------------------------------&lt;br /&gt;
&lt;br /&gt;
Table of local language month names filled by month_names_get()&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local en_months = {};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; P A T T E R N S &amp;gt;--------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
table of tables that hold pattern and other information used to extract date parts for translation and reconstrution&lt;br /&gt;
&lt;br /&gt;
Tables have the form:&lt;br /&gt;
	[1] - pattern for a particular date format; must include captures for the requiste date components:&lt;br /&gt;
			day, month, year which ever are included in the date format&lt;br /&gt;
	[2] - a letter 'd', 'm', or 'y' that identified the content of the first (left-most) capture&lt;br /&gt;
	[3] - same as [2] for the second capture&lt;br /&gt;
	[4] - same as [2] for the last (right-most) capture&lt;br /&gt;
&lt;br /&gt;
ymd numeric dates have no hames so are not translated; use |df= parameter in the cs1|2 template for that.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local patterns = {&lt;br /&gt;
	{'^(%d%d?) +(%a+) +(%d%d%d%d%a?)$', 'd', 'm', 'y'},							-- dd Mmm yyyy&lt;br /&gt;
	{'^(%d%d?) +de +(%a+) +de +(%d%d%d%d%a?)$', 'd', 'm', 'y'},					-- dd de Mmm de yyyy&lt;br /&gt;
	{'^(%a+) +(%d%d%d%d%a?)$', 'm', 'y'},										-- Mmm yyyy&lt;br /&gt;
	{'^(%a+) +de +(%d%d%d%d%a?)$', 'm', 'y'},									-- Mmm de yyyy&lt;br /&gt;
	{'^(%a+) +(%d%d?) *, +(%d%d%d%d%a?)$', 'm', 'd', 'y'},						-- Mmm dd, yyyy&lt;br /&gt;
	{'^(%a+)$', 'm'},															-- month only; mostly for debug purposes&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; O V E R R I D E _ N A M E S &amp;gt;--------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
table of non-English month names that are valid but are not in the list of names taken from MediaWiki with &lt;br /&gt;
month_names_get().  Items in this list have the form:&lt;br /&gt;
	['&amp;lt;non-English month name&amp;gt;'] = 'English month name',&lt;br /&gt;
		'&amp;lt;non-English month name&amp;gt;' must be lowercase&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local override_names = {&lt;br /&gt;
	[''] = '',&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; M O N T H _ N A M E S _ G E T &amp;gt;------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
creates a translation table of non-English month names listed in lang{} mapped to English month names listed in&lt;br /&gt;
en_months{} (which this function also fills).&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function month_names_get ()&lt;br /&gt;
	local month_names = {};&lt;br /&gt;
&lt;br /&gt;
	local lang_obj = mw.language.getContentLanguage();							-- make a language object for the local language &lt;br /&gt;
	for i=1, 12 do																-- loop 12x and &lt;br /&gt;
		en_months[i] = lang_obj:formatDate('F', '2018-' .. i)					-- get month names for each i&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	for _, lang in ipairs (langs) do											-- spin through the languages table&lt;br /&gt;
		lang_obj = mw.getLanguage (lang);										-- make a language object for the current language&lt;br /&gt;
		for i, en_month in ipairs (en_months) do								-- spin through the English month-names table&lt;br /&gt;
			month_names[lang_obj:formatDate('F', en_month):lower()] = en_month;	-- translate the English name to the current language and store in the translations table&lt;br /&gt;
			if 'pl' == lang then												-- for polish and other languages that have nominative and genitive forms&lt;br /&gt;
				month_names[lang_obj:formatDate('xg', en_month):lower()] = en_month;	-- translate English to genitive form and save&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return month_names;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; E X P O R T E D   T A B L E S &amp;gt;------------------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	month_names = month_names_get (),&lt;br /&gt;
	override_names = override_names,&lt;br /&gt;
	patterns = patterns,&lt;br /&gt;
	}&lt;/div&gt;</summary>
		<author><name>Tttrung</name></author>
	</entry>
</feed>