Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Duolingo Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Module:Endangered Languages Project
Module
Discussion
English
Read
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Get shortened URL
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
local p = {} local elpf = "https://www.endangeredlanguages.com/lang/" -- or get P1630 local tidy_param = function(param) if param == "" then param = nil end return param end p.make_entry = function(frame) local out = {} local make_display = function(elpc, elpn) if elpc and elpn then table.insert(out, "[" .. elpf .. elpc .. " " .. elpn .. "]") elseif elpc or elpn then table.insert(out, (elpc or "") .. (elpn or "") .. "[[Category:Language articles with missing ELP parameters]]") end end local elpname = tidy_param(frame.args.elpname) local elpcode = tidy_param(frame.args.elpcode) local qid = tidy_param((frame.args.qid or ""):upper()) or mw.wikibase.getEntityIdForCurrentPage() make_display(elpcode, elpname) if qid then local props = mw.wikibase.getBestStatements(qid, "P2192") if props[1] then for _, v in ipairs(props) do local elpc = v.mainsnak.datavalue and v.mainsnak.datavalue.value local elpn = v.qualifiers and v.qualifiers.P1810 and v.qualifiers.P1810[1].datavalue and v.qualifiers.P1810[1].datavalue.value make_display(elpc, elpn) end end end local ret = "" if #out > 1 then return frame:expandTemplate{title = "ubl", args = out} elseif #out==1 then return out[1] end end return p
Summary:
Please note that all contributions to Duolingo Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Duolingo Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Module:Endangered Languages Project/doc
(
edit
)