Module:In lang/sandbox: Difference between revisions

Content deleted Content added
remove Nihongo support; now in Module:Nihongo/sandbox;
No edit summary
Line 2:
 
 
--[[--------------------------< _ I N _ L A N G >----------------------------------------------------------------
 
implements {{in lang}}
 
Module entry point from another module
Module entry point from an {{#invoke:lang/utilities/sanbox|in_lang|<code>|<code2>|<code3>|<code...>|link=yes|template=in lang|list-cats=yes}}
 
|link=yes - creates wikilinked language names
Line 16:
]]
 
local function in_lang_in_lang (frameargs)
local getArgs = require ('Module:Arguments').getArgs;
local synonym_table = mw.loadData ('Module:Lang/ISO 639 synonyms'); -- ISO 639-2/639-2T code translation to 639-1 code
local list_cats = 'yes' == args['list-cats']; -- make a boolean
local args = getArgs(frame);
local list_cats = 'yes' == args['list-cats']; -- make a boolean
local list = {};
local cats = {};
Line 30 ⟶ 28:
end
 
local module = 'Module:Lang' .. (framemw.getCurrentFrame():getTitle():match ('/sandbox') or ''); -- if this module is the sandbox,
 
local name_from_tag = require (module)._name_from_tag; -- use Module:Lang/sandbox; Module:Lang else
 
Line 90 ⟶ 89:
return table.concat (result); -- make a big string and done
end
 
 
--[[--------------------------< I N _ L A N G >----------------------------------------------------------------
 
implements {{in lang}}
 
Module entry point from an {{#invoke:lang/utilities/sanbox|in_lang|<code>|<code2>|<code3>|<code...>|link=yes|template=in lang|list-cats=yes}}
 
]]
 
local function in_lang (frame)
local getArgsargs = require ('Module:Arguments').getArgs (frame);
return _in_lang (args);
end