Module:phrasebook

Hello, you have come here looking for the meaning of the word Module:phrasebook. In DICTIOUS you will not only get to know all the dictionary meanings for the word Module:phrasebook, but we will also tell you about its etymology, its characteristics and you will know how to say Module:phrasebook in singular and plural. Everything you need to know about the word Module:phrasebook you have here. The definition of the word Module:phrasebook will help you to be more precise and correct when speaking or writing your texts. Knowing the definition ofModule:phrasebook, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.

This module implements the template {{phrasebook}}.


local format_categories = require("Module:utilities").format_categories
local get_lang = require("Module:languages").getByCode
local html_create = mw.html.create
local insert = table.insert
local process_params = require("Module:parameters").process

local pagename = mw.loadData("Module:headword/data").encoded_pagename

local export = {}

function export.show(frame)
	local args = process_params(frame:getParent().args, {
		 = {required = true},
		 = {list = true}
	})
	
	local lang = get_lang(args)
	local langname = lang:getCanonicalName()
	local categories = {}
	
	
	local main = html_create("td"):wikitext("This entry is part of the ] project, which presents ] based on utility, simplicity and commonness.")
	insert(categories, langname .. " phrasebook")
	
	if #args > 0 then
		local topics = {}
		for _, topic in ipairs(args) do
			insert(topics, "<b>]</b>")
			insert(categories, langname .. " phrasebook/" .. topic)
		end
		main = main:tag("div")
			:wikitext("For other " .. langname .. " entries on this topic, see " .. mw.text.listToText(topics, ", ", " or ") .. ".")
			:allDone()
	end
	
	local div = html_create("div")
		:addClass("phrasebook NavFrame")
		:css("background-color", "var(--wikt-palette-orange,#f2caa4)")
		:tag("div")
			:addClass("NavHead")
			:css("background", "var(--wikt-palette-lightyellow,#FFFFE0)")
			:wikitext(langname .. " phrasebook")
			:done()
		:tag("div")
			:addClass("NavContent")
			:tag("table")
				:css("background", "var(--wikt-palette-lightyellow,#FFFFE0)")
				:css("width", "100%")
				:css("margin", "auto")
				:css("text-align", "center")
				:tag("tr")
					:tag("td")
						:css("text-align", "left")
						:wikitext("]")
					:node(main)
		:allDone()
	return tostring(div) .. format_categories(categories, lang, nil, pagename)
end

return export