Module:km-pron/generate

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

This module is used to generate the content on {{km-IPA/documentation}} (well, partly).


local export = {}
local m_links = require("Module:links")
local test_data = require('Module:km-pron/testcases/data')

function export.make(frame)
	local result, args = {}, {}
	for _, data in pairs(test_data) do
		local args = mw.text.split(data.respelling or data.word, ", ")
		args = data.word
		
		table.insert(result, 
			"<h3>" .. 
			
			m_links.language_link{ 
				term = data.word, 
				lang = require("Module:languages").getByCode("km") 
			} .. 
		
			"</h3>\n" .. 
			
			"<pre>{{km-IPA" .. 
			(data.respelling and "|" .. mw.ustring.gsub(data.respelling, ", ", "|") or "") ..
			"}}</pre>\n" ..
			
			mw.getCurrentFrame():expandTemplate{
			title = "Template:km-IPA",
			args = args} .. "\n\n")
	end
	return table.concat(result)
end

return export