<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ar">
	<id>https://3rabica.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3AMonth_translator%2Fdata</id>
	<title>وحدة:Month translator/data - تاريخ المراجعة</title>
	<link rel="self" type="application/atom+xml" href="https://3rabica.org/index.php?action=history&amp;feed=atom&amp;title=%D9%88%D8%AD%D8%AF%D8%A9%3AMonth_translator%2Fdata"/>
	<link rel="alternate" type="text/html" href="https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:Month_translator/data&amp;action=history"/>
	<updated>2026-06-04T21:16:38Z</updated>
	<subtitle>تاريخ التعديل لهذه الصفحة في الويكي</subtitle>
	<generator>MediaWiki 1.43.7</generator>
	<entry>
		<id>https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:Month_translator/data&amp;diff=1568&amp;oldid=prev</id>
		<title>عبد العزيز في 14:34، 11 أبريل 2023</title>
		<link rel="alternate" type="text/html" href="https://3rabica.org/index.php?title=%D9%88%D8%AD%D8%AF%D8%A9:Month_translator/data&amp;diff=1568&amp;oldid=prev"/>
		<updated>2023-04-11T14:34:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;صفحة جديدة&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 = {&amp;#039;ar&amp;#039;,&amp;#039;ca&amp;#039;, &amp;#039;da&amp;#039;, &amp;#039;de&amp;#039;, &amp;#039;es&amp;#039;, &amp;#039;fi&amp;#039;, &amp;#039;fr&amp;#039;, &amp;#039;it&amp;#039;, &amp;#039;nb&amp;#039;, &amp;#039;pl&amp;#039;, &amp;#039;pt&amp;#039;, &amp;#039;ru&amp;#039;, &amp;#039;sv&amp;#039;, &amp;#039;tr&amp;#039;};&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_t = {};&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 reconstruction&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 &amp;#039;d&amp;#039;, &amp;#039;m&amp;#039;, or &amp;#039;y&amp;#039; 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;
	{&amp;#039;^(%d%d?) +(%a+) +(%d%d%d%d%a?)$&amp;#039;, &amp;#039;d&amp;#039;, &amp;#039;m&amp;#039;, &amp;#039;y&amp;#039;},							-- dd Mmm yyyy&lt;br /&gt;
	{&amp;#039;^(%d%d?)%. +(%a+) +(%d%d%d%d%a?)$&amp;#039;, &amp;#039;d&amp;#039;, &amp;#039;m&amp;#039;, &amp;#039;y&amp;#039;},						-- dd. Mmm yyyy – for Danish&lt;br /&gt;
	{&amp;#039;^(%d%d?) +de +(%a+) +de +(%d%d%d%d%a?)$&amp;#039;, &amp;#039;d&amp;#039;, &amp;#039;m&amp;#039;, &amp;#039;y&amp;#039;},					-- dd de Mmm de yyyy&lt;br /&gt;
	{&amp;#039;^(%a+) +(%d%d%d%d%a?)$&amp;#039;, &amp;#039;m&amp;#039;, &amp;#039;y&amp;#039;},										-- Mmm yyyy&lt;br /&gt;
	{&amp;#039;^(%a+) +de +(%d%d%d%d%a?)$&amp;#039;, &amp;#039;m&amp;#039;, &amp;#039;y&amp;#039;},									-- Mmm de yyyy&lt;br /&gt;
	{&amp;#039;^(%a+) +(%d%d?) *, +(%d%d%d%d%a?)$&amp;#039;, &amp;#039;m&amp;#039;, &amp;#039;d&amp;#039;, &amp;#039;y&amp;#039;},						-- Mmm dd, yyyy&lt;br /&gt;
	{&amp;#039;^(%a+)$&amp;#039;, &amp;#039;m&amp;#039;},															-- 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;#039;&amp;lt;non-English month name&amp;gt;&amp;#039;] = &amp;#039;English month name&amp;#039;,&lt;br /&gt;
		&amp;#039;&amp;lt;non-English month name&amp;gt;&amp;#039; must be lowercase&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local override_names = {&lt;br /&gt;
	[&amp;#039;&amp;#039;] = &amp;#039;&amp;#039;,&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;
&amp;lt;en_months_t&amp;gt; (which this function also fills).&lt;br /&gt;
&lt;br /&gt;
lang_obj:formatDate() must be given a day in addition to &amp;lt;en_month&amp;gt; else it will use the current day so, if today&lt;br /&gt;
is 31 August 2021, without the expicit &amp;#039;1&amp;#039; preceding the month from &amp;lt;en_month&amp;gt;, when creating a translation for&lt;br /&gt;
February, April, June, September, or October lang_obj:formatDate() will return the &amp;#039;next&amp;#039; month.&lt;br /&gt;
&lt;br /&gt;
To dump this table: =mw.dumpObject (p.month_names_t)&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function month_names_get ()&lt;br /&gt;
	local month_names_t = {};&lt;br /&gt;
&lt;br /&gt;
	local lang_obj = mw.getLanguage (&amp;#039;en&amp;#039;);							-- make a language object for the local language &lt;br /&gt;
	for i=1, 12 do																-- loop 12x and &lt;br /&gt;
		en_months_t[i] = lang_obj:formatDate(&amp;#039;F&amp;#039;, &amp;#039;2018-&amp;#039; .. 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_t) do								-- spin through the English month-names table&lt;br /&gt;
			local en_date = &amp;#039;1 &amp;#039; .. en_month;&lt;br /&gt;
			local month_name = mw.ustring.lower (lang_obj:formatDate(&amp;#039;F&amp;#039;, en_date));	-- translate the English date &amp;#039;1 &amp;lt;en month&amp;gt;&amp;#039; to &amp;lt;month_name&amp;gt;; ustring requred for tr February (Şubat)&lt;br /&gt;
			month_names_t[month_name] = en_month;								-- add to translations table; first day of month required&lt;br /&gt;
&lt;br /&gt;
																				-- for pl and other languages that have nominative and genitive forms&lt;br /&gt;
			month_name = mw.ustring.lower (lang_obj:formatDate(&amp;#039;xg&amp;#039;, en_date));	-- translate the English date &amp;#039;1 &amp;lt;en month&amp;gt;&amp;#039; to &amp;lt;month_name&amp;gt; (genitive form)&lt;br /&gt;
			month_names_t[month_name] = en_month;								-- add to translations table; when &amp;#039;xg&amp;#039; is same as &amp;#039;F&amp;#039;, this overwrites the &amp;#039;F&amp;#039; month name&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return month_names_t;&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_t = month_names_get (),&lt;br /&gt;
	override_names = override_names,&lt;br /&gt;
	patterns = patterns,&lt;br /&gt;
	}&lt;/div&gt;</summary>
		<author><name>عبد العزيز</name></author>
	</entry>
</feed>