Module:User:Saph/sandbox
Appearance
- This module sandbox lacks a documentation subpage. Please create it.
- Useful links: root page • root page’s subpages • links • transclusions • testcases • sandbox of
local export = {}
link = require("Module:th").format_link
function export.cls(frame)
local args = frame:getParent().args
local result, categories = {}, {}
local space = '<span style="padding-left:4px; padding-right:4px"> </span>'
for i,l in ipairs(args) do
table.insert(result, link(l))
local sortkey = require("Module:languages").getByCode("th"):makeSortKey(result[i])
table.insert(categories, "\n[[Category:Thai nouns classified by " .. l .. "|" .. sortkey .. "]]")
end
return "<span style=\"padding-left:15px; font-size:80%\"><span style=\"background:var(--wikt-palette-cyan, #eaffff);color:inherit\">(''Classifier'': " ..
table.concat(result, ";" .. space) .. ")</span></span>" ..
(mw.title.getCurrentTitle().nsText == "" and table.concat(categories) or "")
end
return export