Difference between revisions of "Module:Template translation"
Jump to navigation
Jump to search
Module:Template translation (view source)
Revision as of 09:54, 26 September 2014
, 09:54, 26 September 2014add getMainLanguageSubpage
>Steinsplitter m |
>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 | ||