Documentation for this module may be created at Module:RootFinder/doc
local p = {} function p.getRootLanguage(frame) 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 lang = parent end end return p