Changes
Jump to navigation
Jump to search
Line 61:
Line 61:
− +
Line 71:
Line 71:
− label = "some text" .. langList[1]
no edit summary
local langList = mw.language.getFallbacksFor(lang)
local langList = mw.language.getFallbacksFor(lang)
table.insert(langList, 1, lang)
table.insert(langList, 1, lang)
local langList = {"en"}
local langList = {"en"} + langList
-- get label (visible part of the link)
-- get label (visible part of the link)
for _, language in ipairs(langList) do -- loop over language fallback list looking for label in the specific language
for _, language in ipairs(langList) do -- loop over language fallback list looking for label in the specific language
if label then break end -- label found and we are done
if label then break end -- label found and we are done
end
end
if not label then -- no labels found, so just show the q-code
if not label then -- no labels found, so just show the q-code
label = item
label = item