local p = local function dutch(frame) local name = frame.args.name or "" local given_name = string.match(name, "(%w+)") or "" local a = string.match(name, "%w+ (%w+ %w+ %w+)") or string.match(name, "%w+ (%w+ %w+)") or string.match(name, "%w+ (%w+)") or "" local family_name = a return "Given name = "..given_name.." -- Family name = "..family_name.."
"end
local function english(frame) local name = frame.args.name or "" local given_name = string.match(name, "(%w+ %w+)") or "" local family_name = string.match(name, "%w+ (%w+-%w+)") or string.match(name, "%w+ %w+ (%w+)") or "" local suffix = string.match(name, "Jr") or string.match(name, "Sr") or "" local suffix2 = string.match(name, "I") or string.match(name, "II") or string.match(name, "III") or string.match(name, "IV") or string.match(name, "V") or string.match(name, "VI") or string.match(name, "VII") or string.match(name, "VIII") or "" if family_name
local function spanish(frame) local name = frame.args.name or "" local a = string.match(name, "(%w+%W+%w+) %w+") or "" local b = string.match(name, "(%w+) %w+") or "" local c = string.match(name, "(%W+%w+) %w+") or "" local d = string.match(name, "%w+ (%w+%W+%w+)") or "" local e = string.match(name, "%w+ %w+(%W+%w+)") or "" local f = string.match(name, "%w+(%W+%w+) %w+") or "" local family_name = string.match(name, "%w+ (%w+%W+%w+-%w+%W+%w+)") or string.match(name, "%w+ (%w+%W+%w+ %w+ %w+ %w+)") or string.match(name, "%w+ (%w+%W+%w+ %w+)") or string.match(name, "%w+ (%w+ %w+%W+%w+)") or "" local particles = string.match(name, "del") or "" local particles2 = string.match(name, "de la") or "" local given_name = "" if b ~= "" then given_name = b end if a ~= "" and a ~= d then given_name = a end if c ~= "" and c ~= e and c ~= d and c ~= f then given_name = c end if particles ~= "" then family_name = string.match(name, "%w+ (%w+ %w+ %w+)") or "" family_name = family_name:gsub("^%l", string.upper) given_name = string.match(name, "(%w+) %w+") or "" end if particles2 ~= "" then family_name = string.match(name, "%w+ (%w+ %w+ %w+ %w+)") or "" family_name = family_name:gsub("^%l", string.upper) given_name = string.match(name, "(%w+) %w+") or "" end return "Given name = "..given_name.." -- Family name = "..family_name.."
"end
local function chinese(frame) local name = frame.args.name or "" local a = string.match(name, "%w+ (%w+)") or "" local given_name = string.match(name, "%w+ (%w+-%w+)") or string.match(name, "%w+ %w+ (%w+-%w+)") or string.match(name, "%w+ (%w+)") or "" local family_name = "" local surname = string.match(name, "Lau") or string.match(name, "Lin") or string.match(name, "Zhao") or string.match(name, "Liu") or string.match(name, "Xu") or string.match(name, "Chow") if surname ~= "" then family_name = surname end if surname ~= "" and surname
"" and (particles ~= "" or b ~= "") then format = spanish end if particles2 ~= "" and particle
"" then format = french end if particles3 ~= "" then format = dutch end if surname ~= "" then format = chinese end if format
"nl" then txt = dutch(frame) end if format
"es" then txt = spanish(frame) end if format
"fr" then txt = french(frame) end if format
"" and a ~= "" then txt = english(frame) end if format
"" and a
return p