Module:Wd/i18n
Documentation for this module may be created at Module:Wd/i18n/doc
-- The values and functions in this submodule should be localized per wiki.
local p = {}
function p.init(aliasesP)
p = {
["errors"] = {
["unknown-data-type"] = "Datatype '$1' is onbekend of wordt niet ondersteund.",
["missing-required-parameter"] = "geen verplichte parameters gedefinieerd, ten minste één benodigd.",
["extra-required-parameter"] = "parameter '$1' moet worden gedefinieerd als zijnde optioneel.",
["no-function-specified"] = "u moet een aan te roepen functie opgeven.", -- equal to the standard module error message
["main-called-twice"] = 'de functie "main" kan niet twee keer worden aangeroepen.',
["no-such-function"] = 'de functie "$1" bestaat niet.' -- equal to the standard module error message
},
["info"] = {
["edit-on-wikidata"] = "Editá pa Wikidata"
},
["numeric"] = {
["decimal-mark"] = ",",
["delimiter"] = "."
},
["datetime"] = {
["prefixes"] = {
["decade-period"] = "dékada "
},
["suffixes"] = {
["decade-period"] = "",
["millennium"] = " milenio",
["century"] = " siglo",
["million-years"] = " mion aña",
["billion-years"] = " bion aña",
["year"] = " aña",
["years"] = " aña"
},
["julian-calendar"] = " kalènder juliano", -- linked page title
["julian"] = "juliano",
["BCE"] = "a.K.",
["CE"] = "d.K.",
["common-era"] = "era komun" -- linked page title
},
["coord"] = {
["latitude-north"] = "nòrt",
["latitude-south"] = "sùit",
["longitude-east"] = "ost",
["longitude-west"] = "wèst",
["degrees"] = "°",
["minutes"] = "'",
["seconds"] = '"',
["separator"] = ", "
},
["values"] = {
["unknown"] = "",
["none"] = ""
},
["cite"] = {
["version"] = "2", -- increment this each time the below parameters are changed to avoid conflict errors
["web"] = {
-- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "")
[aliasesP.statedIn] = "",
[aliasesP.referenceURL] = "",
[aliasesP.publicationDate] = "",
[aliasesP.retrieved] = "",
[aliasesP.title] = "",
[aliasesP.archiveURL] = "",
[aliasesP.archiveDate] = "",
[aliasesP.language] = "",
[aliasesP.author] = "", -- existence of author1, author2, author3, etc. is assumed
[aliasesP.publisher] = "",
[aliasesP.quote] = "",
[aliasesP.pages] = "" -- extra option
},
["q"] = {
-- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources
-- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "")
[aliasesP.statedIn] = "",
[aliasesP.pages] = "",
[aliasesP.column] = "",
[aliasesP.chapter] = "",
[aliasesP.sectionVerseOrParagraph] = "",
["external-id"] = "", -- used for any type of database property ID
[aliasesP.title] = "",
[aliasesP.publicationDate] = "",
[aliasesP.retrieved] = ""
}
}
}
p.getOrdinalSuffix = function(num)
if num == 0 then
return "de"
end
num = tonumber(tostring(math.abs(num)):sub(-2))
if num == 1 or num == 8 then
return "ste"
end
if num > 0 and num < 20 then
return "de"
end
return "ste"
end
p.addDelimiters = function(n)
local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$")
if left and num and right then
return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right
else
return n
end
end
return p
end
return p