မာတိကာသို့ ခုန်သွားရန်

မဝ်ဂျူ:number list/data/ar

နူ ဝိက်ရှေန်နရဳ

Documentation for this module may be created at မဝ်ဂျူ:number list/data/ar/doc

local export = {}

local numbers = {}
export.numbers = numbers

export.numeral_config = {
	zero_codepoint = 0x660, -- ٠, ARABIC-INDIC DIGIT ZERO
	thousands_separator = "٬",
}

numbers[0] = {
	cardinal = "صِفْر",
}

numbers[1] = {
	cardinal = "وَاحِد",
	ordinal = "أَوَّل",
	multiplier = {"أُحَادِيّ", "مُفْرَد", "مُوَحَّد"},
	distributive = {"أُحَادَ", "مَوْحَدَ", "فُرَادَى", "فُرَادَ"},
}

numbers[2] = {
	cardinal = "اِثْنَان",
	ordinal = "ثَانٍ",
	fractional = "نِصْف",
	multiplier = {"ثُنَائِيّ", "مُثَنًّى"},
	distributive = {"ثُنَاءَ", "مَثْنَى"},
}

numbers[3] = {
	cardinal = "ثَلَاثَة",
	ordinal = "ثَالِث",
	fractional = {"ثُلُث", "ثُلْث"},
	multiplier = {"ثُلَاثِيّ", "مُثَلَّث"},
	distributive = {"ثُلَاثَ", "مَثْلَثَ"},
}

numbers[4] = {
	cardinal = "أَرْبَعَة",
	ordinal = "رَابِع",
	fractional = {"رُبُع", "رُبْع"},
	multiplier = {"رُبَاعِيّ", "مُرَبَّع"},
	distributive = "رُبَاعَ",
}

numbers[5] = {
	cardinal = "خَمْسَة",
	ordinal = "خَامِس",
	fractional = {"خُمُس", "خُمْس"},
	multiplier = {"خُمَاسِيّ", "مُخَمَّس"},
	distributive = "خُمَاسَ",
}

numbers[6] = {
	cardinal = "سِتَّة",
	ordinal = "سَادِس",
	fractional = {"سُدُس", "سُدْس"},
	multiplier = {"سُدَاسِيّ", "مُسَدَّس"},
	distributive = "سُدَاسَ",
}

numbers[7] = {
	cardinal = "سَبْعَة",
	ordinal = "سَابِع",
	fractional = {"سُبُع", "سُبْع"},
	multiplier = {"سُبَاعِيّ", "مُسَبَّع"},
	distributive = "سُبَاعَ",
}

numbers[8] = {
	cardinal = "ثَمَانِيَة",
	ordinal = "ثَامِن",
	fractional = {"ثُمُن", "ثُمْن"},
	multiplier = {"ثُمَانِيّ", "مُثَمَّن"},
	distributive = "ثُمَانَ",
}

numbers[9] = {
	cardinal = "تِسْعَة",
	ordinal = "تَاسِع",
	fractional = {"تُسُع", "تُسْع"},
	multiplier = {"تُسَاعِيّ", "مُتَسَّع"},
	distributive = "تُسَاعَ",
}

numbers[10] = {
	cardinal = "عَشَرَة",
	ordinal = "عَاشِر",
	fractional = {"عُشُر", "عُشْر"},
	multiplier = {"عُشَارِيّ", "مُعَشَّر"},
	distributive = "عُشَارَ",
}

numbers[11] = {
	cardinal = "أَحَدَ عَشَرَ",
	ordinal = "حَادِيَ عَشَرَ",
}

numbers[12] = {
	cardinal = "اِثْنَا عَشَرَ",
	ordinal = "ثَانِيَ عَشَرَ",
}

numbers[13] = {
	cardinal = "ثَلَاثَةَ عَشَرَ",
	ordinal = "ثَالِثَ عَشَرَ",
}

numbers[14] = {
	cardinal = "أَرْبَعَةَ عَشَرَ",
	ordinal = "رَابِعَ عَشَرَ",
}

numbers[15] = {
	cardinal = "خَمْسَةَ عَشَرَ",
	ordinal = "خَامِسَ عَشَرَ",
}

numbers[16] = {
	cardinal = "سِتَّةَ عَشَرَ",
	ordinal = "سَادِسَ عَشَرَ",
}

numbers[17] = {
	cardinal = "سَبْعَةَ عَشَرَ",
	ordinal = "سَابِعَ عَشَرَ",
}

numbers[18] = {
	cardinal = "ثَمَانِيَةَ عَشَرَ",
	ordinal = "ثَامِنَ عَشَرَ",
}

numbers[19] = {
	cardinal = "تِسْعَةَ عَشَرَ",
	ordinal = "تَاسِعَ عَشَرَ",
}

local function unpack_ipairs(t)
	local i = 0
	return function()
		i = i + 1
		if t[i] then
			return i, unpack(t[i])
		end
	end
end

for i, tens_cardinal in unpack_ipairs {
	{ "عِشْرُون"},
	{ "ثَلَاثُون" },
	{ "أَرْبَعُون" },
	{ "خَمْسُون" },
	{ "سِتُّون" },
	{ "سَبْعُون" },
	{ "ثَمَانُون" },
	{ "تِسْعُون" },
} do
	local tens = (i + 1) * 10
	numbers[tens] = {
		cardinal = tens_cardinal,
	}
	local suffix = (" وَ" .. tens_cardinal)
	local one_word_cardinal = suffix:sub(-1) ~= " "
	for ones = 1, 9 do
		local ones_cardinal = numbers[ones].cardinal
		local cardinal = ones_cardinal .. suffix
		local number = {}
		numbers[tens + ones] = number
		number.cardinal = cardinal
	end
end

numbers[21] = {
	cardinal = {"وَاحِد وَعِشْرُون", "أَحَد وَعِشْرُون"},
}

numbers[100] = {
	cardinal = {"مِئَة", "مِائَة"},
}

numbers[200] = {
	cardinal = "مِئَتَان",
}

numbers[300] = {
	cardinal = "ثَلَاثُمِائَة",
}

numbers[400] = {
	cardinal = "أَرْبَعُمِائَة",
}

numbers[500] = {
	cardinal = "خَمْسُمِائَة",
}

numbers[600] = {
	cardinal = "سِتُّمِائَة",
}

numbers[700] = {
	cardinal = "سَبْعُمِائَة",
}

numbers[800] = {
	cardinal = "ثَمَانِيمِائَة",
}

numbers[900] = {
	cardinal = "تِسْعُمِائَة",
}

numbers[1000] = {
	cardinal = "أَلْف",
}

numbers[2000] = {
	cardinal = "أَلْفَان",
}

numbers[1000000] = {
	cardinal = {"مِلْيُون", "أَلْف أَلْف"},
}

numbers[2000000] = {
	cardinal = "مِلْيُونَانِ"
}

numbers[1000000000] = {
	cardinal = "مِلْيَار",
}

numbers[2000000000] = {
	cardinal = "مِلْيَارانِ",
}

return export