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

local export = {numbers = {}}

local numbers = export.numbers

numbers[0] = {
	cardinal = "nul",
}

-- other number types:
-- adverbial, multiplier, distributive, collective, fractional

for number, cardinal, ordinal in (function (t)
	local i = 0
	return function()
		i = i + 1
		local v = t[i]
		if type(v) == "table" then
			return i, unpack(v)
		elseif v then
			return i, v
		end
	end
end) {
	{ "één", "eerste" }, "twee", { "drie", "derde" }, "vier", "vijf", "zes",
	"zeven", { "acht", "achtste" }, "negen", "tien", "elf", "twaalf",
} do
	numbers[number] = {
		cardinal = cardinal,
		ordinal = ordinal or cardinal .. "de",
	}
end

for i, stem in ipairs {
	"der", "veer", "vijf", "zes", "zeven", "acht", "negen",
} do
	local number = i + 12
	local cardinal = stem .. "tien"
	numbers[number] = {
		cardinal = cardinal,
		ordinal = cardinal .. "de",
	}
end

local function make_ordinal(cardinal)
	return cardinal .. "ste"
end

local acute = mw.ustring.char(0x0301)
local function remove_acute(word)
	return (word:gsub("é", "e"))
end

for i, stem in ipairs {
	"twin", "der", "veer", "vijf", "zes", "zeven", "tach", "negen",
} do
	local tens = (i + 1) * 10
	local tens_cardinal = stem .. "tig"
	numbers[tens] = {
		cardinal = tens_cardinal,
		ordinal = make_ordinal(tens_cardinal),
	}
	for ones = 1, 9 do
		local ones_cardinal = remove_acute(numbers[ones].cardinal)
		local cardinal = ones_cardinal
			.. (ones_cardinal:find("e$") and "ën" or "en")
			.. tens_cardinal
		numbers[tens + ones] = {
			cardinal = cardinal,
			ordinal = make_ordinal(cardinal),
		}
	end
end

for number, cardinal in pairs {
	[100] = "honderd", [1e3] = "duizend", [1e4] = "tienduizend",
	[1e5] = "honderdduizend", [1e6] = "miljoen", [1e9] = "miljard",
	[1e12] = "biljoen", [1e15] = "biljard", [1e18] = "triljoen",
	[1e21] = "triljard",
} do
	numbers[number] = {
		cardinal = cardinal,
		ordinal = make_ordinal(cardinal),
	}
end
numbers[200] = {
	cardinal = "tweehonderd",
	ordinal = "tweehonderdste"
}
numbers[300] = {
	cardinal = "driehonderd",
	ordinal = "driehonderdste"
}
numbers[400] = {
	cardinal = "vierhonderd",
	ordinal = "vierhonderdste"
}
numbers[500] = {
	cardinal = "vijfhonderd",
	ordinal = "vijfhonderdste"
}
numbers[600] = {
	cardinal = "zeshonderd",
	ordinal = "zeshonderdste"
}
numbers[700] = {
	cardinal = "zevenhonderd",
	ordinal = "zevenhonderdste"
}
numbers[800] = {
	cardinal = "achthonderd",
	ordinal = "achthonderdste"
}
numbers[900] = {
	cardinal = "negenhonderd",
	ordinal = "negenhonderdste"
}
numbers[1000] = {
	cardinal = "duizend",
	ordinal = "duizendste"
}
return export