Difference between revisions of "Module:Template translation"

Jump to navigation Jump to search
add getMainLanguageSubpage
en>Steinsplitter
m
en>Amire80
(add getMainLanguageSubpage)
Line 63: Line 63:
     local subpage = titleparts[#titleparts]
     local subpage = titleparts[#titleparts]
     return this.checkLanguage(subpage, '')
     return this.checkLanguage(subpage, '')
end
--[[Get the first part of the language code of the subpage, before the '-'.
    ]]
function this.getMainLanguageSubpage()
parts = mw.text.split( this.getLanguageSubpage(), '-' )
return parts[1]
end
end


Anonymous user

Navigation menu