Module:Lang-zh: Difference between revisions

Content deleted Content added
turn categories into data table to simplify code + inline remainder of language code; add more comments
forgot the function used at end, inline it there too, rm unnecessary check (only one param so no chance of 'no' being set), change to use data tables for consistency
Line 134:
if (c) then
if (c > "") then -- if there is treat it as Chinese
clocal params = p.{lang(=ISOlang["zh", c)"]}
params["xml:lang"] = ISOlang["c"]
if (no) then -- handle "links=no"
c = mw.text.tag({name="span",attr=params, content=c})
return "Chinese: " .. c
return "[[" .. wlinks["c"] .. "|" .. labels["c"] .. "]]: " .. c .. cats["c"]
else
return "[[Chinese language|Chinese]]: " .. c
end
end
end
return body""
end
end