<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://test.st34an.tech/index.php?action=history&amp;feed=atom&amp;title=Module%3ALanguage-like</id>
	<title>Module:Language-like - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://test.st34an.tech/index.php?action=history&amp;feed=atom&amp;title=Module%3ALanguage-like"/>
	<link rel="alternate" type="text/html" href="https://test.st34an.tech/index.php?title=Module:Language-like&amp;action=history"/>
	<updated>2026-04-10T22:42:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://test.st34an.tech/index.php?title=Module:Language-like&amp;diff=279&amp;oldid=prev</id>
		<title>Jsrs701: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://test.st34an.tech/index.php?title=Module:Language-like&amp;diff=279&amp;oldid=prev"/>
		<updated>2026-04-10T07:29:34Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:29, 10 April 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key mediawikidb:diff:1.41:old-278:rev-279 --&gt;
&lt;/table&gt;</summary>
		<author><name>Jsrs701</name></author>
	</entry>
	<entry>
		<id>https://test.st34an.tech/index.php?title=Module:Language-like&amp;diff=278&amp;oldid=prev</id>
		<title>bob&gt;Vaxjedi at 22:17, 30 January 2021</title>
		<link rel="alternate" type="text/html" href="https://test.st34an.tech/index.php?title=Module:Language-like&amp;diff=278&amp;oldid=prev"/>
		<updated>2021-01-30T22:17:13Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local export = {}&lt;br /&gt;
--&lt;br /&gt;
-- Implementation of getOtherNames() for languages, etymology languages,&lt;br /&gt;
-- families and scripts. If `onlyOtherNames` is passed in, only return&lt;br /&gt;
-- the names in the `otherNames` field, otherwise combine `otherNames`,&lt;br /&gt;
-- `aliases` and `varieties`.&lt;br /&gt;
function export.getOtherNames(self, onlyOtherNames)&lt;br /&gt;
	if onlyOtherNames then&lt;br /&gt;
		return self._rawData.otherNames or {}&lt;br /&gt;
	end&lt;br /&gt;
	-- Combine otherNames, aliases and varieties. First try to optimize and not create any&lt;br /&gt;
	-- new memory. This is possible if exactly one of the three exist, and if it&amp;#039;s `varieties`,&lt;br /&gt;
	-- there are no nested lists in `varieties`.&lt;br /&gt;
	if self._rawData.otherNames and not self._rawData.aliases and not self._rawData.varieties then&lt;br /&gt;
		return self._rawData.otherNames&lt;br /&gt;
	elseif self._rawData.aliases and not self._rawData.otherNames and not self._rawData.varieties then&lt;br /&gt;
		return self._rawData.aliases&lt;br /&gt;
	elseif self._rawData.varieties and not self._rawData.otherNames and not self._rawData.aliases then&lt;br /&gt;
		local saw_table = false&lt;br /&gt;
		for _, name in ipairs(self._rawData.varieties) do&lt;br /&gt;
			if type(name) == &amp;quot;table&amp;quot; then&lt;br /&gt;
				saw_table = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if not saw_table then&lt;br /&gt;
			return self._rawData.varieties&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Have to do it the &amp;quot;hard way&amp;quot;.&lt;br /&gt;
	local ret = {}&lt;br /&gt;
	if self._rawData.otherNames then&lt;br /&gt;
		for _, name in ipairs(self._rawData.otherNames) do&lt;br /&gt;
			table.insert(ret, name)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if self._rawData.aliases then&lt;br /&gt;
		for _, name in ipairs(self._rawData.aliases) do&lt;br /&gt;
			table.insert(ret, name)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if self._rawData.varieties then&lt;br /&gt;
		for _, name in ipairs(self._rawData.varieties) do&lt;br /&gt;
			if type(name) == &amp;quot;table&amp;quot; then&lt;br /&gt;
				for _, n in ipairs(name) do&lt;br /&gt;
					table.insert(ret, n)&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				table.insert(ret, name)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Implementation of getVarieties() for languages, etymology languages,&lt;br /&gt;
-- families and scripts. If `flatten` is passed in, flatten down to a&lt;br /&gt;
-- list of stings; otherwise, keep the structure.&lt;br /&gt;
function export.getVarieties(self, flatten)&lt;br /&gt;
	if self._rawData.varieties then&lt;br /&gt;
		-- If flattening not requested, just return them.&lt;br /&gt;
		if not flatten then&lt;br /&gt;
			return self._rawData.varieties&lt;br /&gt;
		end&lt;br /&gt;
		-- Check if no nested table; if so, just return the result.&lt;br /&gt;
		local saw_table = false&lt;br /&gt;
		for _, name in ipairs(self._rawData.varieties) do&lt;br /&gt;
			if type(name) == &amp;quot;table&amp;quot; then&lt;br /&gt;
				saw_table = true&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		if not saw_table then&lt;br /&gt;
			return self._rawData.varieties&lt;br /&gt;
		end&lt;br /&gt;
		-- At this point, we need to flatten the varieties.&lt;br /&gt;
		local ret = {}&lt;br /&gt;
		for _, name in ipairs(self._rawData.varieties) do&lt;br /&gt;
			if type(name) == &amp;quot;table&amp;quot; then&lt;br /&gt;
				for _, n in ipairs(name) do&lt;br /&gt;
					table.insert(ret, n)&lt;br /&gt;
				end&lt;br /&gt;
			else&lt;br /&gt;
				table.insert(ret, name)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		return ret&lt;br /&gt;
	else&lt;br /&gt;
		return {}&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Implementation of template-callable getByCode() function for languages,&lt;br /&gt;
-- etymology languages, families and scripts. `item` is the language,&lt;br /&gt;
-- family or script in question; `args` is the arguments passed in by the&lt;br /&gt;
-- module invocation; `extra_processing`, if specified, is a function of&lt;br /&gt;
-- one argument (the requested property) and should return the value to&lt;br /&gt;
-- be returned to the caller, or nil if the property isn&amp;#039;t recognized.&lt;br /&gt;
-- `extra_processing` is called after special-cased properties are handled&lt;br /&gt;
-- and before general-purpose processing code that works for all string&lt;br /&gt;
-- properties.&lt;br /&gt;
function export.templateGetByCode(item, args, extra_processing)&lt;br /&gt;
	-- The item that the caller wanted to look up&lt;br /&gt;
	local itemname = args[2] or error(&amp;quot;Function to call (parameter 2) has not been specified.&amp;quot;)&lt;br /&gt;
	local list&lt;br /&gt;
	if itemname == &amp;quot;getOtherNames&amp;quot; then&lt;br /&gt;
		list = item:getOtherNames()&lt;br /&gt;
	elseif itemname == &amp;quot;getOnlyOtherNames&amp;quot; then&lt;br /&gt;
		list = item:getOtherNames(true)&lt;br /&gt;
	elseif itemname == &amp;quot;getAliases&amp;quot; then&lt;br /&gt;
		list = item:getAliases()&lt;br /&gt;
	elseif itemname == &amp;quot;getVarieties&amp;quot; then&lt;br /&gt;
		list = item:getVarieties(true)&lt;br /&gt;
	end&lt;br /&gt;
	if list then&lt;br /&gt;
		local index = args[3]; if index == &amp;quot;&amp;quot; then index = nil end&lt;br /&gt;
		index = tonumber(index or error(&amp;quot;Numeric index of the desired item in the list (parameter 3) has not been specified.&amp;quot;))&lt;br /&gt;
		return list[index] or &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if itemname == &amp;quot;getFamily&amp;quot; and item.getFamily then&lt;br /&gt;
		return item:getFamily():getCode()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if extra_processing then&lt;br /&gt;
		local retval = extra_processing(itemname)&lt;br /&gt;
		if retval then&lt;br /&gt;
			return retval&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	if item[itemname] then&lt;br /&gt;
		local ret = item[itemname](item)&lt;br /&gt;
		&lt;br /&gt;
		if type(ret) == &amp;quot;string&amp;quot; then&lt;br /&gt;
			return ret&lt;br /&gt;
		else&lt;br /&gt;
			error(&amp;quot;The function \&amp;quot;&amp;quot; .. itemname .. &amp;quot;\&amp;quot; did not return a string value.&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	error(&amp;quot;Requested invalid item name \&amp;quot;&amp;quot; .. itemname .. &amp;quot;\&amp;quot;.&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>bob&gt;Vaxjedi</name></author>
	</entry>
</feed>