Module:Johnuniq/t-simple

There are no reviewed versions of this page, so it may not have been checked for adherence to standards.

Documentation for this module may be created at Module:Johnuniq/t-simple/doc

-- Test performance of {{t-simple}} if it were to use a module (at Wiktionary).
-- This does not do anything useful: it just tests use of a big table.
-- Current usage (no module) is at Wiktionary:
--   http://en.wiktionary.org/wiki/water#Translations
--   Example:
--   * A-Pucikwar: {{t-simple|apq|ino}}
-- Use preview with page title: User:Johnuniq/water

return {
    tsimple = function (frame)
	local m = require("Module:languages")
        local args = frame:getParent().args
        local langcode = args[1] or 'apq'
        local word = args[2] or 'ino'
        return "[[" .. word .. "#" .. m[langcode]["names"][1] .. "|" .. word .. "]]"
    end,
    tsimple_loadData = function (frame)
	local m = mw.loadData("Module:languages")
        local args = frame:getParent().args
        local langcode = args[1] or 'apq'
        local word = args[2] or 'ino'
        return "[[" .. word .. "#" .. m[langcode]["names"][1] .. "|" .. word .. "]]"
    end,
}