Changes
m
fixed for now (the test for apostrophe is broken and commented out)
-- Get the last subpage (this function isolated for debugging purpose)
local subpage = mw.title.getCurrentTitle().subpageText
--[[If the subpage is a valid language code, check if a translation of the template exists in that language; if so, put it in langcode. Check first if there's an apostrophe, because they break the isKnownLanguageTag function.THIS TEST DOES NOT WORK
]]
--if (mw.ustring.match(subpage, "'") == nil)
--then
--[[If the subpage is a valid language code, check if a translation of the
template exists in that language; if so, put it in langcode.
]]
if (mw.language.isKnownLanguageTag(subpage))
then
end
local langcode = 'en'
-- Get the last subpageand check if it matches a known language code
local subpage = this.getLanguageSubpage()
if (subpage ~= '')