<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nl">
	<id>https://wiki-raamsdonk.nl/index.php?action=history&amp;feed=atom&amp;title=Module%3ALink_with_country</id>
	<title>Module:Link with country - Bewerkingsoverzicht</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-raamsdonk.nl/index.php?action=history&amp;feed=atom&amp;title=Module%3ALink_with_country"/>
	<link rel="alternate" type="text/html" href="https://wiki-raamsdonk.nl/index.php?title=Module:Link_with_country&amp;action=history"/>
	<updated>2026-04-18T22:27:59Z</updated>
	<subtitle>Bewerkingsoverzicht voor deze pagina op de wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://wiki-raamsdonk.nl/index.php?title=Module:Link_with_country&amp;diff=120242&amp;oldid=prev</id>
		<title>Colani: 1 versie geïmporteerd</title>
		<link rel="alternate" type="text/html" href="https://wiki-raamsdonk.nl/index.php?title=Module:Link_with_country&amp;diff=120242&amp;oldid=prev"/>
		<updated>2024-07-09T22:47:16Z</updated>

		<summary type="html">&lt;p&gt;1 versie geïmporteerd&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nieuwe pagina&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local ISO_3166 = require(&amp;#039;Module:ISO 3166&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local function ltrim(s)&lt;br /&gt;
    return s:match &amp;#039;^%s*(.*)&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function split_with_comma(str)&lt;br /&gt;
    local fields = {}&lt;br /&gt;
    for field in str:gmatch(&amp;#039;([^,]+)&amp;#039;) do&lt;br /&gt;
        fields[#fields + 1] = ltrim(field)&lt;br /&gt;
    end&lt;br /&gt;
    return fields&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function to_ISO_3166(country)&lt;br /&gt;
    for i = 1, #country do&lt;br /&gt;
        local shortname = ISO_3166.name({ country[i] })&lt;br /&gt;
        if shortname ~= &amp;quot;&amp;quot; then country[i] = shortname end&lt;br /&gt;
    end&lt;br /&gt;
    return country&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function to_str(arr)&lt;br /&gt;
    local cstring = &amp;quot;&amp;quot;&lt;br /&gt;
    for i = 1, #arr - 1 do&lt;br /&gt;
        cstring = cstring .. ltrim(arr[i]) .. &amp;quot;, &amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
    cstring = cstring .. ltrim(arr[#arr])&lt;br /&gt;
    return cstring&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function p.countrynames(frame)&lt;br /&gt;
    -- local test = frame.args[1] .. &amp;quot;, &amp;quot; .. frame.args.property&lt;br /&gt;
    --    return test&lt;br /&gt;
&lt;br /&gt;
    -- change comma list to array&lt;br /&gt;
    Countryarray = split_with_comma(frame.args[1])&lt;br /&gt;
&lt;br /&gt;
    -- put each array entry {as a table} through Module:ISO 3166. If the result is null, keep original entry&lt;br /&gt;
    to_ISO_3166(Countryarray)&lt;br /&gt;
&lt;br /&gt;
    -- change array back to comma string&lt;br /&gt;
    Commastring = to_str(Countryarray)&lt;br /&gt;
&lt;br /&gt;
    return Commastring&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Colani</name></author>
	</entry>
</feed>