Module:Sandbox: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
local p = mw.title.new( title ) |
local p = mw.title.new( title ) |
||
if p.exists then |
if p.exists then |
||
local lang_name = mw.language.fetchLanguageName( lang ) |
|||
output = output .. string.format('<li lang="%s" style="white-space: nowrap;">[[%s| |
output = output .. string.format('<li lang="%s" style="white-space: nowrap;">[[%s|%s]]</li>', lang, title, lang_name) |
||
end |
end |
||
end |
end |
||
Line 24: | Line 25: | ||
-- supported languages |
-- supported languages |
||
local lang_list = { |
local lang_list = { 'ca', 'da', 'de', 'es', 'es-419', 'fr', 'he', 'hu', 'it', 'ja', 'lv', 'nb', 'nl', 'pl', 'pt', 'pt-br', 'ro', 'ru', 'sk', 'sv', 'uk', 'zh-hans' } |
||
local output = |
local output = '' |
||
for i, lang in ipairs(lang_list) do |
for i, lang in ipairs(lang_list) do |
||
output = output .. string.gsub([==[ |
|||
|- |
|- |
||
! scope="row" | {{#language:~LANG~}} |
! scope="row" | {{#language:~LANG~}} |