<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.americanmusicclub.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AI18n</id>
	<title>Module:I18n - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.americanmusicclub.com/index.php?action=history&amp;feed=atom&amp;title=Module%3AI18n"/>
	<link rel="alternate" type="text/html" href="https://wiki.americanmusicclub.com/index.php?title=Module:I18n&amp;action=history"/>
	<updated>2026-04-05T19:53:33Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>https://wiki.americanmusicclub.com/index.php?title=Module:I18n&amp;diff=28683&amp;oldid=prev</id>
		<title>Amc-admin: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki.americanmusicclub.com/index.php?title=Module:I18n&amp;diff=28683&amp;oldid=prev"/>
		<updated>2018-01-13T00:28:55Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
-- Credit to http://stackoverflow.com/a/1283608/2644759&lt;br /&gt;
-- cc-by-sa 3.0&lt;br /&gt;
local function tableMerge(t1, t2, overwrite)&lt;br /&gt;
	for k,v in pairs(t2) do&lt;br /&gt;
		if type(v) == &amp;quot;table&amp;quot; and type(t1[k]) == &amp;quot;table&amp;quot; then&lt;br /&gt;
			-- since type(t1[k]) == type(v) == &amp;quot;table&amp;quot;, so t1[k] and v is true&lt;br /&gt;
			tableMerge(t1[k], v, overwrite) -- t2[k] == v&lt;br /&gt;
		else&lt;br /&gt;
			if overwrite or t1[k] == nil then t1[k] = v end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return t1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.loadI18n(name, i18n_arg)&lt;br /&gt;
	local exist, res = pcall(require, name)&lt;br /&gt;
	if exist and next(res) ~= nil then&lt;br /&gt;
		if i18n_arg then&lt;br /&gt;
			tableMerge(i18n_arg, res.i18n, true)&lt;br /&gt;
		elseif type(i18n) == &amp;quot;table&amp;quot; then&lt;br /&gt;
			-- merge to global i18n&lt;br /&gt;
			tableMerge(i18n, res.i18n, true)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.loadI18nFrame(frame, i18n_arg)&lt;br /&gt;
	p.loadI18n(frame:getTitle()..&amp;quot;/i18n&amp;quot;, i18n_arg)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Amc-admin</name></author>
	</entry>
</feed>