Module:Wikt-lang: Difference between revisions

Content deleted Content added
for generating language name prefix used in templates such as Template:lang-fr
have to check that variable is not an empty string, or template will not work
Line 127:
 
f = {}
 
local function checkForString(variable)
return variable ~= "" and variable ~= nil
end
 
local function generatePrefix(languageCode)
Line 189 ⟶ 193:
local word2 = frame.args[3]
if languageCode then
if checkForString(word2) and checkForString(word1) then
entry = strip(word1, languageCode)
linkText = word2
elseif checkForString(word1) then
entry = strip(word1, languageCode)
linkText = word1