return result;
end  
--[[--------------------------< I S _ N A M E >----------------------------------------------------------------  
template entry point; returns ISO 639-1, -2, -3, or -5 code associated with language name according to part (1, 2, 3, 5) argument;
when part is not provided scans 1, 2, 3 , 5 and returns first code  
override data are examined first  
args[1] is language name
args[2] is ISO 639 part  
local function is_name
local args = getArgs;
local _, result = _code_from_name (args); -- suppress code return used by code_from_name
return result and true or nil;
end  
--[[--------------------------< I S O _ 6 3 9 >----------------------------------------------------------------  
template entry point.
returns:
language name if args[1] is valid language code
language code if args[1] is valid language name  
this function is constrained to the ISO 639 part specified in args[2] which must be 1, 2, 2B, 3, or 5. When not provided
all parts are tested. The first match is found  
local function iso_639
local args = getArgs ;
local hide = 'yes' == args['hide-err']; -- suppress error messages and error categorization
local nocat = 'no' == args.cat; -- suppress error categorization (primarily for demo use)
local result;
local found; -- set to true when language name is found  
if not args[1] then
return error_msg ('code_name', '', hide, nocat);
end  
local part = args[2];
if part then -- if ISO 639 part supplied
local part_idx = get_part_index (part); -- map index from <part>; anything else nil  
if not part_idx then
return error_msg ('not_part', part, hide, nocat); -- abandon; args[2] is not a valid ISO 639 part
end  
result, found = name_from_code_common (args, parts[part_idx][1], parts[part_idx][2]); -- attempt to find a code match
if found then
return result; -- found the code so return the language name
end  
result = _code_from_name (args); -- might be a language name; return code if it is; error message or empty string else
return result; -- this way to suppress second return  
else
for _, part in ipairs (parts) do -- for each of the iso 639 parts
result, found = name_from_code_common (args, part[1], part[2]); -- attempt to find a code match
if found then
return result; -- found the code so return the language name
end
end
end  
result = _code_from_name (args); -- might be a language name; return code if it is; error message or empty string else
return result; -- this way to suppress second return
end  
----------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------  
return {
iso_639 = iso_639, -- returns code when given name; returns name when given code  
is_code = is_code,
is_name = is_name,  
name_from_code = name_from_code,
name_from_code_1 = name_from_code_1,
name_from_code_2 = name_from_code_2,
name_from_code_2B = name_from_code_2B,
name_from_code_3 = name_from_code_3,
name_from_code_5 = name_from_code_5,  
code_from_name = code_from_name,  
iso_639_code_exists = is_code, -- deprecated
iso_639_name_exists = is_name, -- deprecated  
iso_639_code_to_name = name_from_code, -- deprecated
iso_639_code_1_to_name = name_from_code_1, -- deprecated
iso_639_code_2_to_name = name_from_code_2, -- deprecated
iso_639_code_2B_to_name = name_from_code_2B, -- deprecated
iso_639_code_3_to_name = name_from_code_3, -- deprecated
iso_639_code_5_to_name = name_from_code_5, -- deprecated  
iso_639_name_to_code = code_from_name, -- deprecated
};