打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模块:En

来自末世录
OnlyOTO留言 | 贡献2026年3月28日 (六) 01:18的版本 (导入1个版本)

此模块的文档可以在模块:En/doc创建

local p = {}
local wikipedia = "https://en.wikipedia.org/wiki/"
local noLang = false

local function genEn(frame)
  local enPage = frame.args[1]
  if enPage ~= nil then
    enPage = enPage:gsub(" ", "_")
  else
    enPage = ""
  end
  local display = frame.args[2]
  if display ~= nil and display ~= "" then
    display = display:gsub("_", " ")
  else
    display = enPage:gsub("_", " ")
  end
  local title = mw.title.getCurrentTitle()
  local  res = "([" .. wikipedia .. enPage .. " " .. display .. "])"
 --  end 
  if noLang ~= true then
    res = res .. "[[en:" .. enPage:gsub("_", " ") .. "]]"
  end
  return res
end

function p.en(frame)
  return genEn(frame)
end

function p.enNoLang(frame)
  noLang = true
  return genEn(frame)
end

return p