Jump to content

Module:Link language

From Simple English Wikipedia, the free encyclopedia
Revision as of 04:27, 30 June 2017 by Mr. Stradivarius (talk | changes) (trim input strings and check for blank input)

Documentation for this module may be created at Module:Link language/doc

local p = {}
local cfg = mw.loadData ('Module:Citation/CS1/Configuration')

function p.lang_render(frame)
	local lang = frame.args[1]
	lang = lang and mw.text.trim(lang)
	if lang and lang ~= '' then
		return mw.message.newRawMessage(cfg.messages['language'], lang):plain()
	else
		return 'no language specified'
	end
end

return p