Hello, you have come here looking for the meaning of the word
Module:User:Rua/langspan. In DICTIOUS you will not only get to know all the dictionary meanings for the word
Module:User:Rua/langspan, but we will also tell you about its etymology, its characteristics and you will know how to say
Module:User:Rua/langspan in singular and plural. Everything you need to know about the word
Module:User:Rua/langspan you have here. The definition of the word
Module:User:Rua/langspan will help you to be more precise and correct when speaking or writing your texts. Knowing the definition of
Module:User:Rua/langspan, as well as those of other words, enriches your vocabulary and provides you with more and better linguistic resources.
local export = {}
local LangSpan = {}
LangSpan.__index = LangSpan
function export.new(text, lang, face, sc, tr)
self = setmetatable({ _text = text, _lang = lang, _face = face, _sc = sc, _tr = tr }, LangSpan)
-- Detect script
if not self._sc then
self._sc = require("Module:scripts").findBestScript(self._text, self._lang)
end
return self
end
-- Wrap text in the appropriate HTML tags with language and script class.
function LangSpan:show()
-- Add a script wrapper
if self._face == nil then
return '<span class="' .. self._sc:getCode() .. '" lang="' .. self._lang:getCode() .. '">' .. self._text .. '</span>'
elseif self._face == "term" then
return '<i class="' .. self._sc:getCode() .. ' mention" lang="' .. self._lang:getCode() .. '">' .. self._text .. '</i>'
elseif self._face == "head" then
return '<strong class="' .. self._sc:getCode() .. ' headword" lang="' .. self._lang:getCode() .. '">' .. self._text .. '</strong>'
elseif self._face == "bold" then
return '<b class="' .. self._sc:getCode() .. '" lang="' .. self._lang:getCode() .. '">' .. self._text .. '</b>'
else
error("Invalid script face \"" .. self._face .. "\".")
end
end
function LangSpan:getScript()
return self._sc
end
return export