Module:Month translator/data explained

--

local langs = ;

----------------------------< E N G L I S H M O N T H N A M E S >----------------------------------------

Table of local language month names filled by month_names_get

local en_months_t = ;

--df= parameter in the cs1|2 template for that.

local patterns = ;

--

local override_names =

--

local function month_names_get local month_names_t = ;

local lang_obj = mw.language.getContentLanguage; -- make a language object for the local language for i=1, 12 do -- loop 12x and en_months_t[i] = lang_obj:formatDate('F', '2018-' .. i); -- get month names for each i end

for _, lang in ipairs (langs) do -- spin through the languages table lang_obj = mw.getLanguage (lang); -- make a language object for the current language for i, en_month in ipairs (en_months_t) do -- spin through the English month-names table local en_date = '1 ' .. en_month; local month_name = mw.ustring.lower (lang_obj:formatDate('F', en_date)); -- translate the English date '1 ' to ; ustring requred for tr February (Şubat) month_names_t[month_name] = en_month; -- add to translations table; first day of month required

-- for pl and other languages that have nominative and genitive forms month_name = mw.ustring.lower (lang_obj:formatDate('xg', en_date)); -- translate the English date '1 ' to (genitive form) month_names_t[month_name] = en_month; -- add to translations table; when 'xg' is same as 'F', this overwrites the 'F' month name end end

return month_names_t;end

----------------------------< E X P O R T E D T A B L E S >------------------------------------------------

return