Module:number list/data/tlh

local export = {}

local numbers = {} export.numbers = numbers

numbers[0] = {cardinal = "pagh"} numbers[1] = {cardinal = "wa'"} numbers[2] = {cardinal = "cha'"} numbers[3] = {cardinal = "wej"} numbers[4] = {cardinal = "loS"} numbers[5] = {cardinal = "vagh"} numbers[6] = {cardinal = "jav"} numbers[7] = {cardinal = "Soch"} numbers[8] = {cardinal = "chorgh"} numbers[9] = {cardinal = "Hut"} numbers[10] = {cardinal = "maH"}

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 = 1, 10 do numbers[i].ordinal = numbers[i].cardinal .. 'DIch' numbers[i].adverbial = numbers[i].cardinal .. 'logh' end for i = 1, 9 do	local tens = i * 10 if i > 1 then numbers[tens] = { cardinal = numbers[i].cardinal .. 'maH' } end for ones = 1, 9 do numbers[tens + ones] = { cardinal = numbers[tens].cardinal .. ' ' .. numbers[ones].cardinal } end end

numbers[100] = {cardinal = "vatlh"} numbers[1000] = {cardinal = {"SaD", "SanID"}} numbers[10000] = {cardinal = "netlh"} numbers[100000] = {cardinal = "bIp"} numbers[1000000] = {cardinal = "'uy'"}

local piqdstyle = "font-family: pIqaD, Constructium, 'Klingon pIqaD HaSta', Code2000, Horta, 'Unifont CSUR', 'Kurinto Text Aux', 'Kurinto Book Aux', 'Kurinto Sans Aux'"

local digits = {'', '', '', '', '', '', '', '', ''} digits[0] = '' for key,value in pairs(numbers) do	if key < 10 then numbers[key].numeral = ' '..digits[key]..' ' else local inp = tostring(key) local outp = {} for i = 0, #inp do	   	table.insert(outp, digits[tonumber(string.sub(inp, i, i))]) end numbers[key].numeral = ' '..table.concat(outp)..' ' end end

return export