<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2Ftrappist_the_monk%2Fhyphenated_language_names</id>
	<title>Module:Sandbox/trappist the monk/hyphenated language names - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2Ftrappist_the_monk%2Fhyphenated_language_names"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/trappist_the_monk/hyphenated_language_names&amp;action=history"/>
	<updated>2026-05-27T10:15:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/trappist_the_monk/hyphenated_language_names&amp;diff=146613&amp;oldid=prev</id>
		<title>imported&gt;Legoktm: Replace Module:No globals with require( &quot;strict&quot; )</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/trappist_the_monk/hyphenated_language_names&amp;diff=146613&amp;oldid=prev"/>
		<updated>2022-10-23T21:01:55Z</updated>

		<summary type="html">&lt;p&gt;Replace &lt;a href=&quot;/research/Module:No_globals&quot; title=&quot;Module:No globals&quot;&gt;Module:No globals&lt;/a&gt; with require( &amp;quot;strict&amp;quot; )&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;);&lt;br /&gt;
local data_m = mw.loadData (&amp;#039;Module:Language/data/iana languages&amp;#039;);&lt;br /&gt;
local redirect_m = require(&amp;#039;Module:Redirect&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function get_redirect (name)&lt;br /&gt;
	if redirect_m.luaIsRedirect (name) then&lt;br /&gt;
		local target = redirect_m.getTarget (name);								-- get the redirect&amp;#039;s target&lt;br /&gt;
		if target:find (&amp;#039;–&amp;#039;, 1, true) then&lt;br /&gt;
			return table.concat ({&amp;#039; → [[&amp;#039;, target, &amp;#039;]]&amp;#039;});						-- make and return a wikilink&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;;																	-- return empty string for concatenation&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
local function list()&lt;br /&gt;
	local list_t = {}&lt;br /&gt;
	&lt;br /&gt;
	for _, v in ipairs ({&amp;#039;active&amp;#039;, &amp;#039;deprecated&amp;#039;}) do							-- there are two lists in the data module, do them both&lt;br /&gt;
		for tag, name_t in pairs (data_m[v]) do									-- for each tag/language-name pair&lt;br /&gt;
			if name_t[1]:find (&amp;#039;-&amp;#039;, 1, true) then								-- look for a hyphen in the language name&lt;br /&gt;
				local redirect = &amp;#039;&amp;#039;;&lt;br /&gt;
				if not (name_t[1]:find (&amp;#039;%d%-&amp;#039;) or name_t[1]:find (&amp;#039;%-%d&amp;#039;)) then								-- skip hyphenated names where the hyphen is associated with digits&lt;br /&gt;
					if name_t[1]:find (&amp;#039;[Ll]anguages?&amp;#039;) then					-- for collective language names and language names that contain &amp;#039;language&amp;#039;&lt;br /&gt;
						redirect = get_redirect (name_t[1]);&lt;br /&gt;
						table.insert (list_t, table.concat ({&amp;#039;#[[&amp;#039;, name_t[1], &amp;#039;]]&amp;#039;, redirect}));			-- make wikilink&lt;br /&gt;
					else&lt;br /&gt;
						redirect = get_redirect (name_t[1]);&lt;br /&gt;
						table.insert (list_t, table.concat ({&amp;#039;#[[&amp;#039;, name_t[1], &amp;#039; language]]&amp;#039;, redirect}));	-- make nornal language wikilink&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
&lt;br /&gt;
	table.sort (list_t);														-- sort the list to make it all pretty-like&lt;br /&gt;
	return table.concat (list_t, &amp;#039;\n&amp;#039;);											-- make a big string and done&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return {list = list}&lt;/div&gt;</summary>
		<author><name>imported&gt;Legoktm</name></author>
	</entry>
</feed>