Module:Lang: Difference between revisions

+is_ietf_code();
(synch from sandbox;)
(+is_ietf_code();)
Line 1,161:
initial_style_state = 'inherit';
return _lang_xx (frame);
end
 
 
--[[--------------------------< I S _ I E T F _ C O D E >------------------------------------------------------
 
Returns true when a language name associated with IETF language tag exists; nil else.
 
All code combinations supported by {{lang}} and the {{lang-xx}} templates are supported by this function.
 
The purpose of this function is to replace {{#ifexist:Template:ISO 639 name xx|<exists>|<does not exist>}} in
templates that are better served by using {{#invoke:lang|name_from_code|<code>}}
 
]]
 
local function is_ietf_code (frame)
return get_ietf_parts (frame.args[1]) and true;
end
 
Line 1,291 ⟶ 1,307:
return {
lang = lang, -- entry point for {{lang}}
is_ietf_code = is_ietf_code,
lang_xx_inherit = lang_xx_inherit, -- entry points for {{lang-??}}
lang_xx_italic = lang_xx_italic,
Anonymous user