-- Hijri Month names comment this line to use MediaWiki names
local hijri_months = { 'محرم', 'صفر', 'ربيع الأول', 'ربيع الآخر', 'جمادى الأولى', 'جمادى الآخرة', 'رجب', 'شعبان', 'رمضان', 'شوال', 'ذو القعدة', 'ذو الحجة' }
local hijri_short_months = { 'محرم', 'صفر', 'ربيع1', 'ربيع2', 'جمادى1', 'جمادى2', 'رجب', 'شعبان', 'رمضان', 'شوال', 'ذوالقعدة', 'ذوالحجة' }
-- Gregorian Month names comment this line to use MediaWiki names
local gregorian_months = { 'يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو', 'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر' }
--[[ Hijri mode:
	0 tabular calender (Kwaiti Algorithm)
	1 Umm al-Qura Calender With adjustments
	2 Umm al-Qura Calender without adjustments
]]
local aliases = {
	["format"]	= {1,"الصيغة", "format"},
	["source_cal"]  = {"تقويم المصدر", "المصدر", "التقويم","Cal","cal"},
	["year"]	= {"س", "سنة", "السنة", "y", "year"},
	["month"]	  = {"شهر", "ش" ,"الشهر", "m", "month"},
	["day"]   = {"اليوم", "ي", "يوم", "d", "day"},
	["wday"]	 = {"يوم الأسبوع", "wday"},
	["hijri_cal_type"]   = {"التقويم الهجري", "نوع التقويم الهجري", "hijri Calendar type"},
	["date"] = {2, "التاريخ","تاريخ","date"},
	["pass_mw_time"] = {"تمرير على وقت", "pass mw time"}
}

local cal_aliases = {
    ["hijri"]      = {"هجري","الهجري", "hijri"},
    ["hijri_adjusted_umalqura"] = {"هجري معدل","أم القرى معدل","ام القرى معدل", "معدل", "adjusted umalqura"},
    ["hijri_umalqura"] = {"أم القرى","ام القرى", "umalqura"},
    ["hijri_tabular"]    = {"هجري مجدول", "هجري اصطلاحي","اصطلاحي", "مجدول", "tabular"},
    ["gregorian"]   = {"جريجوري","غريغوري", "gregorian"},
    ["julian"]   = {"يولياني" ,"شرقي", "julian"},
    ["western"]   = {"ميلادي", "غربي", "western"}
}

local wday_aliases = {
	[0] = {"أحد", "الأحد", "احد", "الاحد", "sunday"},
	[1] = {"إثنين", "الإثنين", "اثنين", "الاثنين", "monday"},
	[2] = {"ثلاثاء", "الثلاثاء", "tuesday"},
	[3] = {"اربعاء", "الاربعاء", "أربعاء", "الأربعاء", "wednesday"},
	[4] = {"الخميس", "خميس", "thursday"},
	[5] = {"جمعة", "الجمعة", "جمعه", "الجمعه", "friday"},
	[6] = {"سبت", "السبت", "saturday"},
}

local symbol_replace = {
	default_symbol_pattern = {'[jFntYyzdm]',
	'[شسلةع]',
	'[ير]0?' },

	calendars = {
		hijri = {
			type = 'hijri',
			sym_pre = { 'xm',
			 '~ه',
			 '~ه'},
			func = { month_name = 'hijri_month_name' }
			-- you can add also ['symbols_pattern'] table if members are not equal to sym_pre[i] .. default_symbol_pattern[i] 
		},

		julian = {
			type = 'julian',
			sym_pre = { 'xu',
			'~ي',
			'~ي' },
			func = { month_name = 'julian_month_name' }
		},

		gregorian = { 
			type = 'gregorian',
			sym_pre = { 'xg',
			'~غ',
			'~غ'},
			func = { month_name = 'julian_month_name' }
		},

		western = { 
			type = 'western',
			sym_pre = { 'xw',
			'~م',
			'~م'},
			func = { month_name = 'julian_month_name' }
		}
	},

	symbols = {
		{
			j = { rep = 'day' },
			F = { rep = 'month',
				func = 'month_name'},
			n = { rep = 'month'},
			Y = { rep = 'year'},
			t = { rep = 'month_days'},
			z = { rep = 'yday'},
			y = { rep = 'year',
				func = 'towdigit'},
			m = { rep = 'month',
				func = 'towdigit'},
			d = { rep = 'day',
				func = 'towdigit'}
		},

		{
			['ش'] = { rep = 'month',
				func = 'month_name'},
			['س'] = { rep = 'year'},
			['ل'] = { rep = 'month_days'},
			['ة'] = { rep = 'yday'},
			['ع'] = { rep = 'wday',
					func = 'wday_name'}
		},

		{
			['ي'] = { rep = 'day' },
			['ي0'] = { rep = 'day',
				func = 'towdigit'},
			['ر'] = { rep = 'month'},
			['ر0'] = { rep = 'month',
				func = 'towdigit'}
		},
	}
}

local msgs = {
}

local presentation = {
	["error"] = '<strong class="error">$1</strong>'
}

local hijri_mode = 1

return {
	hijri_months = hijri_months,
	hijri_short_months = hijri_short_months,
	gregorian_months = gregorian_months,
	hijri_mode = hijri_mode,
	aliases =  aliases,
	cal_aliases = cal_aliases,
	wday_aliases = wday_aliases,
	symbol_replace = symbol_replace,
	msgs = msgs,
	presentation = presentation
}