<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>https://wiki.noethoumy.fr/index.php?action=history&amp;feed=atom&amp;title=Module%3AI18n</id>
	<title>Module:I18n - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.noethoumy.fr/index.php?action=history&amp;feed=atom&amp;title=Module%3AI18n"/>
	<link rel="alternate" type="text/html" href="https://wiki.noethoumy.fr/index.php?title=Module:I18n&amp;action=history"/>
	<updated>2026-04-27T18:14:03Z</updated>
	<subtitle>Historique des versions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://wiki.noethoumy.fr/index.php?title=Module:I18n&amp;diff=239&amp;oldid=prev</id>
		<title>Jaggerwock : Page créée avec « local p = {}  -- Credit to http://stackoverflow.com/a/1283608/2644759 -- cc-by-sa 3.0 local function tableMerge(t1, t2, overwrite) 	for k,v in pairs(t2) do 		if type(v) == &quot;table&quot; and type(t1[k]) == &quot;table&quot; then 			-- since type(t1[k]) == type(v) == &quot;table&quot;, so t1[k] and v is true 			tableMerge(t1[k], v, overwrite) -- t2[k] == v 		else 			if overwrite or t1[k] == nil then t1[k] = v end 		end 	end 	return t1 end  function p.loadI18n(name, i18n_arg) 	local exist, r... »</title>
		<link rel="alternate" type="text/html" href="https://wiki.noethoumy.fr/index.php?title=Module:I18n&amp;diff=239&amp;oldid=prev"/>
		<updated>2024-09-19T14:46:49Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « local p = {}  -- Credit to http://stackoverflow.com/a/1283608/2644759 -- cc-by-sa 3.0 local function tableMerge(t1, t2, overwrite) 	for k,v in pairs(t2) do 		if type(v) == &amp;quot;table&amp;quot; and type(t1[k]) == &amp;quot;table&amp;quot; then 			-- since type(t1[k]) == type(v) == &amp;quot;table&amp;quot;, so t1[k] and v is true 			tableMerge(t1[k], v, overwrite) -- t2[k] == v 		else 			if overwrite or t1[k] == nil then t1[k] = v end 		end 	end 	return t1 end  function p.loadI18n(name, i18n_arg) 	local exist, r... »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle 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>Jaggerwock</name></author>
	</entry>
</feed>