Module:Lang: Difference between revisions

sync from sandbox;
m (159 revisions imported: infobox)
(sync from sandbox;)
Line 601:
if is_set (code) then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transl}})
if not style then -- nil for is the default italic style
table.insert (tout, "<i lang=\""); -- so use <i> tag
else
Line 619:
table.insert (tout, '-language') -- skip this text (individual and macro languages only)
end
table.insert (tout, ' transliterationromanization'); -- finish the tool tip; use romanization when neither script nor standard supplied
elseif is_set (std) and is_set (tscript) then -- when both are specified
if title_table[std] then -- and if standard is legitimate
Line 660:
table.insert (tout, '">');
table.insert (tout, translit);
if is_set (code) and not style then -- when a language code is provided (always with {{lang-xx}} templates, not always with {{transl}})
table.insert (tout, "</i>"); -- close the italic tag
else
Line 801:
<includeonly>{{#invoke:lang|lang}}</includeonly>
 
parameters are recievedreceived from the template's frame (parent frame)
 
]]
Line 898:
<includeonly>{{#invoke:lang|lang}}</includeonly>
 
parameters are recievedreceived from the template's frame (parent frame)
 
]]
Line 1,107:
translit_title = mw.title.makeTitle (0, table.concat ({'Romanization of ', translit_script_name})); -- make a title object
if translit_title.exists and ('no' ~= args.link) then
table.insert (out, make_wikilink ('Romanization of ' .. translit_script_name or language_name, 'translit.romanized') .. ':'); -- make a wikilink if there is an article to link to
else
-- table.insert (out, '<abbr title="transliteration">translit.</abbr>'); -- else define the abbreviation
table.insert (out, 'romanized:'); -- else define the abbreviation
end
table.insert (out, '&nbsp;</small>'); -- close the small tag