local export = {numbers = {}}
local numbers = export.numbers
numbers[0] = {
cardinal = "żero",
}
numbers[1] = {
cardinal = "wieħed",
ordinal = "ewwel",
adverbial = "darba",
}
numbers[2] = {
cardinal = "tnejn",
ordinal = "it-tieni",
fractional = "nofs",
adverbial = "darbtejn",
}
numbers[3] = {
cardinal = "tlieta",
ordinal = "it-tielet",
adverbial = "tlitt darbiet",
}
numbers[4] = {
cardinal = "erbgħa",
ordinal = "ir-raba'",
fractional = "kwart",
adverbial = "erba' darbiet",
}
numbers[5] = {
cardinal = "ħamsa",
ordinal = "il-ħames",
fractional = "kwint",
}
numbers[6] = {
cardinal = "sitta",
ordinal = "is-sitt",
}
numbers[7] = {
cardinal = "sebgħa",
ordinal = "is-seba'",
}
numbers[8] = {
cardinal = "tmienja",
ordinal = "it-tmien",
}
numbers[9] = {
cardinal = "disgħa",
ordinal = "id-disa'",
}
numbers[10] = {
cardinal = "għaxra",
ordinal = "l-għaxar",
}
numbers[11] = {
cardinal = "ħdax",
}
numbers[12] = {
cardinal = "tnax",
}
numbers[13] = {
cardinal = "tlettax",
}
numbers[14] = {
cardinal = "erbatax",
}
numbers[15] = {
cardinal = "ħmistax",
}
numbers[16] = {
cardinal = "sittax",
}
numbers[17] = {
cardinal = "sbatax",
}
numbers[18] = {
cardinal = "tmintax",
}
numbers[19] = {
cardinal = "dsatax",
}
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 {
{ "għoxrin"},
{ "tletin" },
{ "erbgħin" },
{ "ħamsin" },
{ "sittin" },
{ "sebgħin" },
{ "tmenin" },
{ "disgħin" },
} do
local tens = (i + 1) * 10
numbers[tens] = {
cardinal = tens_cardinal,
}
local suffix = (" u " .. 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[100] = {
cardinal = "mija",
}
numbers[200] = {
cardinal = "mitejn",
}
numbers[1000] = {
cardinal = "elf",
}
numbers[2000] = {
cardinal = "elfejn",
}
numbers[1000000] = {
cardinal = "miljun",
}
return export