<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://youjo.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikimedia_languages</id>
	<title>Module:Wikimedia languages - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://youjo.wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AWikimedia_languages"/>
	<link rel="alternate" type="text/html" href="https://youjo.wiki/index.php?title=Module:Wikimedia_languages&amp;action=history"/>
	<updated>2026-10-17T20:06:31Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://youjo.wiki/index.php?title=Module:Wikimedia_languages&amp;diff=1542&amp;oldid=prev</id>
		<title>Chizu: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://youjo.wiki/index.php?title=Module:Wikimedia_languages&amp;diff=1542&amp;oldid=prev"/>
		<updated>2022-09-23T19:42:22Z</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-GB&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 19:42, 23 September 2022&lt;/td&gt;
				&lt;/tr&gt;
&lt;!-- diff cache key youjowiki:diff::1.12:old-1541:rev-1542 --&gt;
&lt;/table&gt;</summary>
		<author><name>Chizu</name></author>
	</entry>
	<entry>
		<id>https://youjo.wiki/index.php?title=Module:Wikimedia_languages&amp;diff=1541&amp;oldid=prev</id>
		<title>Wiktionary&gt;Surjection: Reverted edits by Surjection. If you think this rollback is in error, please leave a message on my talk page.</title>
		<link rel="alternate" type="text/html" href="https://youjo.wiki/index.php?title=Module:Wikimedia_languages&amp;diff=1541&amp;oldid=prev"/>
		<updated>2021-08-08T22:23:41Z</updated>

		<summary type="html">&lt;p&gt;Reverted edits by &lt;a href=&quot;/index.php?title=Special:Contributions/Surjection&quot; title=&quot;Special:Contributions/Surjection&quot;&gt;Surjection&lt;/a&gt;. If you think this rollback is in error, please leave a message on my &lt;a href=&quot;/index.php?title=User_talk:Surjection&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Surjection (page does not exist)&quot;&gt;talk page&lt;/a&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;
local WikimediaLanguage = {}&lt;br /&gt;
&lt;br /&gt;
function WikimediaLanguage:getCode()&lt;br /&gt;
	return self._code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function WikimediaLanguage:getCanonicalName()&lt;br /&gt;
	return self._rawData.canonicalName&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--function WikimediaLanguage:getAllNames()&lt;br /&gt;
--	return self._rawData.names&lt;br /&gt;
--end&lt;br /&gt;
&lt;br /&gt;
function WikimediaLanguage:getType()&lt;br /&gt;
	return &amp;quot;Wikimedia&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function WikimediaLanguage:getWiktionaryLanguage()&lt;br /&gt;
	if not self._wiktionaryLanguageObject then&lt;br /&gt;
		self._wiktionaryLanguageObject = require(&amp;quot;Module:languages&amp;quot;).getByCode(self._rawData.wiktionary_code)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return self._wiktionaryLanguageObject&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Do NOT use this method!&lt;br /&gt;
-- All uses should be pre-approved on the talk page!&lt;br /&gt;
function WikimediaLanguage:getRawData()&lt;br /&gt;
	return self._rawData&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
WikimediaLanguage.__index = WikimediaLanguage&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function export.getByCode(code)&lt;br /&gt;
	-- Only accept codes the software recognises&lt;br /&gt;
	if not mw.language.isKnownLanguageTag(code) then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local rawData = mw.loadData(&amp;quot;Module:wikimedia languages/data&amp;quot;)[code]&lt;br /&gt;
	&lt;br /&gt;
	-- If there is no specific Wikimedia code, then &amp;quot;borrow&amp;quot; the information&lt;br /&gt;
	-- from the general Wiktionary language code&lt;br /&gt;
	if not rawData then&lt;br /&gt;
		local lang = require(&amp;quot;Module:languages&amp;quot;).getByCode(code)&lt;br /&gt;
		&lt;br /&gt;
		if not lang then&lt;br /&gt;
			return nil&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		rawData = {canonicalName = lang:getCanonicalName(), wiktionary_code = code}&lt;br /&gt;
	elseif not rawData.canonicalName then&lt;br /&gt;
		rawData = {canonicalName = require(&amp;quot;Module:languages&amp;quot;).getByCode(rawData.wiktionary_code):getCanonicalName(), wiktionary_code = rawData.wiktionary_code}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return setmetatable({ _rawData = rawData, _code = code }, WikimediaLanguage)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function export.getByCodeWithFallback(code)&lt;br /&gt;
	local object = export.getByCode(code)&lt;br /&gt;
	&lt;br /&gt;
	if object then&lt;br /&gt;
		return object&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local lang = require(&amp;quot;Module:languages&amp;quot;).getByCode(code)&lt;br /&gt;
	&lt;br /&gt;
	if not lang then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return lang:getWikimediaLanguages()[1]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return export&lt;/div&gt;</summary>
		<author><name>Wiktionary&gt;Surjection</name></author>
	</entry>
</feed>