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

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

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

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

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