Module:RootFinder: Difference between revisions
From The Seven Sages of Rome
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
local p = {} | local p = {} | ||
function p. | function p.getRootLanguage(frame) | ||
local | local lang = mw.title.getCurrentTitle().text | ||
local prop = "Is Variety Of" | |||
while true do | |||
local parent = mw.smw.getProperty(lang, prop) | |||
if not parent or parent == "" then | |||
return lang | |||
end | end | ||
lang = parent | |||
end | end | ||
end | end | ||
return p | return p | ||
Revision as of 08:02, 26 March 2025
Documentation for this module may be created at Module:RootFinder/doc