বিষয়বস্তুতে চলুন

মডিউল:number list/data/ary

উইকিঅভিধান, মুক্ত অভিধান থেকে

এই মডিউলের জন্য মডিউল:number list/data/ary/নথি-এ নথিপত্র তৈরি করা হয়ে থাকতে পারে

local export = {}

local numbers = {}
export.numbers = numbers

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

numbers[1] = {
	cardinal = "واحد",
	ordinal = "أول"
}

numbers[2] = {
	cardinal = {"تنين", "زوج", "جوج"},
	ordinal = "تاني",
	fractional = "نص"
}

numbers[3] = {
	cardinal = "تلاتة",
	ordinal = "تالت",
	fractional = "تلت"
}

numbers[4] = {
	cardinal = {"ربعة", "أربعة"},
	ordinal = "رابع",
	fractional = "ربع"
}

numbers[5] = {
	cardinal = "خمسة",
	ordinal = "خامس",
	fractional = "خمس"
}

numbers[6] = {
	cardinal = "ستة",
	ordinal = {"سات", "سادس"},
	fractional = "سدس"
}

numbers[7] = {
	cardinal = "سبعة",
	ordinal = "سابع",
	fractional = "سبع"
}

numbers[8] = {
	cardinal = "تمنية",
	ordinal = "تامن",
	fractional = "تمن"
}

numbers[9] = {
	cardinal = {"تسعود", "تسعة"},
	ordinal = "تاسع",
	fractional = "تسع"
}

numbers[10] = {
	cardinal = "عشرة",
	ordinal = "عاشر",
	fractional = "عشر"
}

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

	for ones = 1, 9 do
		local number = {}
		numbers[tens + ones] = number

        local ones_cardinal = {}
        if ones == 2 then
			table.insert(ones_cardinal, "تنين")
		else 
            local temp = numbers[ones].cardinal
            if type(temp) == "string" then
				table.insert(ones_cardinal, temp)
			elseif type(temp) == "table" then
				ones_cardinal = numbers[ones].cardinal
			end
        end
        local cardinals = {}
        for i, o_cardinal in ipairs(ones_cardinal) do
		    table.insert(cardinals, ones_cardinal[i] .. suffix)
        end
        number.cardinal = cardinals
	end
end

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[10000] = {
	cardinal = "عشر آلاف"
}

numbers[100000] = {
	cardinal = "مية ألف"
}

numbers[1000000] = {
	cardinal = "مليون"
}

numbers[1000000000] = {
	cardinal = "مليار"
}

return export