<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://www.wikiw.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3ACitation%2FCS1%2FLanguage</id>
	<title>模块:Citation/CS1/Language - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikiw.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3ACitation%2FCS1%2FLanguage"/>
	<link rel="alternate" type="text/html" href="https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Citation/CS1/Language&amp;action=history"/>
	<updated>2026-04-08T20:51:38Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Citation/CS1/Language&amp;diff=2050&amp;oldid=prev</id>
		<title>imported&gt;Shizhao：​自Module:Citation/CS1/Language/sandbox合并Sanmosa的版本88914419</title>
		<link rel="alternate" type="text/html" href="https://www.wikiw.cn/index.php?title=%E6%A8%A1%E5%9D%97:Citation/CS1/Language&amp;diff=2050&amp;oldid=prev"/>
		<updated>2025-08-31T11:26:02Z</updated>

		<summary type="html">&lt;p&gt;自&lt;a href=&quot;/index.php?title=%E6%A8%A1%E5%9D%97:Citation/CS1/Language/sandbox&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;模块:Citation/CS1/Language/sandbox（页面不存在）&quot;&gt;Module:Citation/CS1/Language/sandbox&lt;/a&gt;合并&lt;a href=&quot;/index.php?title=%E7%89%B9%E6%AE%8A:%E7%94%A8%E6%88%B7%E8%B4%A1%E7%8C%AE/Sanmosa&quot; title=&quot;特殊:用户贡献/Sanmosa&quot;&gt;Sanmosa&lt;/a&gt;的&lt;a href=&quot;/index.php?title=%E7%89%B9%E6%AE%8A:%E5%9B%BA%E5%AE%9A%E9%93%BE%E6%8E%A5/88914419&quot; title=&quot;特殊:固定链接/88914419&quot;&gt;版本88914419&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[--------------------------&amp;lt; F O R W A R D   D E C L A R A T I O N S &amp;gt;--------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
local is_set, in_array, wrap_msg, wrap_style; &lt;br /&gt;
local add_prop_cat, add_maint_cat;&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; L O C A L _  T A B L E &amp;gt;-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local local_table = {&lt;br /&gt;
	[&amp;#039;abe&amp;#039;] = &amp;#039;西阿贝纳基语&amp;#039;,&lt;br /&gt;
	[&amp;#039;abq&amp;#039;] = &amp;#039;阿巴扎语&amp;#039;,&lt;br /&gt;
	[&amp;#039;abq-latn&amp;#039;] = &amp;#039;阿巴扎语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;abs&amp;#039;] = &amp;#039;安汶马来语&amp;#039;,&lt;br /&gt;
	[&amp;#039;ady-cyrl&amp;#039;] = &amp;#039;阿迪格语（西里尔文）&amp;#039;,&lt;br /&gt;
	[&amp;#039;aeb-arab&amp;#039;] = &amp;#039;突尼斯阿拉伯语（阿拉伯文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;aeb-latn&amp;#039;] = &amp;#039;突尼斯阿拉伯语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;alc&amp;#039;] = &amp;#039;阿拉卡卢夫语&amp;#039;,&lt;br /&gt;
	[&amp;#039;ami&amp;#039;] = &amp;#039;阿美语&amp;#039;,&lt;br /&gt;
	[&amp;#039;azb&amp;#039;] = &amp;#039;南阿塞拜疆语&amp;#039;,&lt;br /&gt;
	[&amp;#039;bat-smg&amp;#039;] = &amp;#039;萨莫吉希亚语&amp;#039;,&lt;br /&gt;
	[&amp;#039;bbc-latn&amp;#039;] = &amp;#039;多巴巴塔克语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;bcc&amp;#039;] = &amp;#039;南俾路支语&amp;#039;,&lt;br /&gt;
	[&amp;#039;bcl&amp;#039;] = &amp;#039;中比科尔语&amp;#039;,&lt;br /&gt;
	[&amp;#039;bdr&amp;#039;] = &amp;#039;西海岸巴瑶语&amp;#039;,&lt;br /&gt;
	[&amp;#039;be-tarask&amp;#039;] = &amp;#039;白俄罗斯语（传统正写法）&amp;#039;,&lt;br /&gt;
	[&amp;#039;be-x-old&amp;#039;] = &amp;#039;白俄罗斯语（传统正写法）&amp;#039;,&lt;br /&gt;
	[&amp;#039;bgp&amp;#039;] = &amp;#039;东俾路支语&amp;#039;,&lt;br /&gt;
	[&amp;#039;bh&amp;#039;] = &amp;#039;博杰普尔语&amp;#039;,&lt;br /&gt;
	[&amp;#039;bxr&amp;#039;] = &amp;#039;俄罗斯布里亚特语&amp;#039;,&lt;br /&gt;
	[&amp;#039;cja&amp;#039;] = &amp;#039;西部占语&amp;#039;,&lt;br /&gt;
	[&amp;#039;cja-arab&amp;#039;] = &amp;#039;西部占语（阿拉伯文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cja-cham&amp;#039;] = &amp;#039;西部占语（阿拉伯文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cja-latn&amp;#039;] = &amp;#039;西部占语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjm&amp;#039;] = &amp;#039;东部占语&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjm-arab&amp;#039;] = &amp;#039;东部占语（阿拉伯文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjm-cham&amp;#039;] = &amp;#039;东部占语（阿拉伯文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjm-latn&amp;#039;] = &amp;#039;东部占语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjy&amp;#039;] = &amp;#039;晋语&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjy-hans&amp;#039;] = &amp;#039;晋语（简体）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cjy-hant&amp;#039;] = &amp;#039;晋语（繁体）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ckt&amp;#039;] = &amp;#039;楚科奇语&amp;#039;,&lt;br /&gt;
	[&amp;#039;cnr&amp;#039;] = &amp;#039;蒙特內哥羅語&amp;#039;,&lt;br /&gt;
	[&amp;#039;en-in&amp;#039;] = &amp;#039;印度英语&amp;#039;,&lt;br /&gt;
	[&amp;#039;en-nz&amp;#039;] = &amp;#039;紐西蘭英語&amp;#039;,&lt;br /&gt;
	[&amp;#039;ike-cans&amp;#039;] = &amp;#039;东加拿大语（原住民音节）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ike-latn&amp;#039;] = &amp;#039;东加拿大语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ruq&amp;#039;] = &amp;#039;梅格莱诺-罗马尼亚语&amp;#039;,&lt;br /&gt;
	[&amp;#039;ruq-cyrl&amp;#039;] = &amp;#039;梅格列诺-罗马尼亚语（西里尔文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ruq-grek&amp;#039;] = &amp;#039;梅格列诺-罗马尼亚语（希腊文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ruq-latn&amp;#039;] = &amp;#039;梅格列诺-罗马尼亚语（拉丁文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;cdo&amp;#039;] = &amp;#039;闽东语&amp;#039;,&lt;br /&gt;
	[&amp;#039;cdo-hani&amp;#039;] = &amp;#039;闽东语（汉字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ja-hani&amp;#039;] = &amp;#039;日语（汉字文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ja-hira&amp;#039;] = &amp;#039;日语（平假名文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ja-hrkt&amp;#039;] = &amp;#039;日语（假名文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ja-kana&amp;#039;] = &amp;#039;日语（片假名文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ko-kp&amp;#039;] = &amp;#039;朝鲜朝鲜语&amp;#039;,&lt;br /&gt;
	[&amp;#039;kk-cn&amp;#039;] = &amp;#039;中国哈萨克语&amp;#039;,&lt;br /&gt;
	[&amp;#039;no&amp;#039;] = &amp;#039;挪威语&amp;#039;,&lt;br /&gt;
	[&amp;#039;ojp&amp;#039;] = &amp;#039;古日语&amp;#039;,&lt;br /&gt;
	[&amp;#039;ojp-hani&amp;#039;] = &amp;#039;古日语（汉字文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ojp-hira&amp;#039;] = &amp;#039;古日语（平假名文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;tet&amp;#039;] = &amp;#039;德顿语&amp;#039;,&lt;br /&gt;
	[&amp;#039;ug-arab&amp;#039;] = &amp;#039;维吾尔语（阿拉伯文字）&amp;#039;,&lt;br /&gt;
	[&amp;#039;ug-latn&amp;#039;] = &amp;#039;维吾尔语（拉丁文字）&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-cn&amp;#039;] = &amp;#039;中国大陆中文&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-hans&amp;#039;] = &amp;#039;简体中文&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-hant&amp;#039;] = &amp;#039;繁體中文&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-hk&amp;#039;] = &amp;#039;香港中文&amp;#039;,&lt;br /&gt;
	[&amp;#039;zh-min-nan&amp;#039;] = &amp;#039;闽南语&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-mo&amp;#039;] = &amp;#039;澳門中文&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-my&amp;#039;] = &amp;#039;马来西亚中文&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-sg&amp;#039;] = &amp;#039;新加坡中文&amp;#039;,&lt;br /&gt;
--	[&amp;#039;zh-tw&amp;#039;] = &amp;#039;臺灣中文&amp;#039;,&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
local function fetchLocalLanguageName (code)&lt;br /&gt;
	return local_table[code];&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; F O R M A T _ S C R I P T _ V A L U E &amp;gt;----------------------------------------&lt;br /&gt;
&lt;br /&gt;
|script-title= holds title parameters that are not written in Latin based scripts: Chinese, Japanese, Arabic, Hebrew, etc. These scripts should&lt;br /&gt;
not be italicized and may be written right-to-left.  The value supplied by |script-title= is concatenated onto Title after Title has been wrapped&lt;br /&gt;
in italic markup.&lt;br /&gt;
&lt;br /&gt;
Regardless of language, all values provided by |script-title= are wrapped in &amp;lt;bdi&amp;gt;...&amp;lt;/bdi&amp;gt; tags to isolate rtl languages from the English left to right.&lt;br /&gt;
&lt;br /&gt;
|script-title= provides a unique feature.  The value in |script-title= may be prefixed with a two-character ISO639-1 language code and a colon:&lt;br /&gt;
	|script-title=ja:*** *** (where * represents a Japanese character)&lt;br /&gt;
Spaces between the two-character code and the colon and the colon and the first script character are allowed:&lt;br /&gt;
	|script-title=ja : *** ***&lt;br /&gt;
	|script-title=ja: *** ***&lt;br /&gt;
	|script-title=ja :*** ***&lt;br /&gt;
Spaces preceding the prefix are allowed: |script-title = ja:*** ***&lt;br /&gt;
&lt;br /&gt;
The prefix is checked for validity.  If it is a valid ISO639-1 language code, the lang attribute (lang=&amp;quot;ja&amp;quot;) is added to the &amp;lt;bdi&amp;gt; tag so that browsers can&lt;br /&gt;
know the language the tag contains.  This may help the browser render the script more correctly.  If the prefix is invalid, the lang attribute&lt;br /&gt;
is not added.  At this time there is no error message for this condition.&lt;br /&gt;
&lt;br /&gt;
Supports |script-title= and |script-chapter=&lt;br /&gt;
&lt;br /&gt;
TODO: error messages when prefix is invalid ISO639-1 code; when script_value has prefix but no script;&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function format_script_value (script_value)&lt;br /&gt;
	local lang=&amp;#039;&amp;#039;;																-- initialize to empty string&lt;br /&gt;
	local name;&lt;br /&gt;
	if script_value:match(&amp;#039;^%l%l%s*:&amp;#039;) then										-- if first 3 non-space characters are script language prefix&lt;br /&gt;
		lang = script_value:match(&amp;#039;^(%l%l)%s*:%s*%S.*&amp;#039;);						-- get the language prefix or nil if there is no script&lt;br /&gt;
		if not is_set (lang) then&lt;br /&gt;
			return &amp;#039;&amp;#039;;															-- script_value was just the prefix so return empty string&lt;br /&gt;
		end&lt;br /&gt;
																				-- if we get this far we have prefix and script&lt;br /&gt;
		name = mw.language.fetchLanguageName( lang, mw.getContentLanguage():getCode() );						-- get language name so that we can use it to categorize&lt;br /&gt;
		if is_set (name) then													-- is prefix a proper ISO 639-1 language code?&lt;br /&gt;
			script_value = script_value:gsub (&amp;#039;^%l%l%s*:%s*&amp;#039;, &amp;#039;&amp;#039;);				-- strip prefix from script&lt;br /&gt;
																				-- is prefix one of these language codes?&lt;br /&gt;
			if in_array (lang, {&amp;#039;ar&amp;#039;, &amp;#039;bg&amp;#039;, &amp;#039;bs&amp;#039;, &amp;#039;dv&amp;#039;, &amp;#039;el&amp;#039;, &amp;#039;fa&amp;#039;, &amp;#039;he&amp;#039;, &amp;#039;hy&amp;#039;, &amp;#039;ja&amp;#039;, &amp;#039;ka&amp;#039;, &amp;#039;ko&amp;#039;, &amp;#039;ku&amp;#039;, &amp;#039;mk&amp;#039;, &amp;#039;ps&amp;#039;, &amp;#039;ru&amp;#039;, &amp;#039;sd&amp;#039;, &amp;#039;sr&amp;#039;, &amp;#039;th&amp;#039;, &amp;#039;uk&amp;#039;, &amp;#039;ug&amp;#039;, &amp;#039;yi&amp;#039;, &amp;#039;zh&amp;#039;}) then&lt;br /&gt;
				add_prop_cat (&amp;#039;script_with_name&amp;#039;, {name, lang})&lt;br /&gt;
			else&lt;br /&gt;
				add_prop_cat (&amp;#039;script&amp;#039;)&lt;br /&gt;
			end&lt;br /&gt;
			lang = &amp;#039; lang=&amp;quot;&amp;#039; .. lang .. &amp;#039;&amp;quot; &amp;#039;;									-- convert prefix into a lang attribute&lt;br /&gt;
		else&lt;br /&gt;
			lang = &amp;#039;&amp;#039;;															-- invalid so set lang to empty string&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if is_set(script_value) then&lt;br /&gt;
		script_value = &amp;#039;-{R|&amp;#039; .. script_value .. &amp;#039;}-&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
	script_value = wrap_style(&amp;#039;bdi&amp;#039;, {lang, script_value});						-- isolate in case script is rtl&lt;br /&gt;
&lt;br /&gt;
	return script_value;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; S C R I P T _ C O N C A T E N A T E &amp;gt;------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Initially for |title= and |script-title=, this function concatenates those two parameter values after the script value has been &lt;br /&gt;
wrapped in &amp;lt;bdi&amp;gt; tags.&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function script_concatenate (title, script)&lt;br /&gt;
	if is_set(title) then&lt;br /&gt;
		title = &amp;#039;-{R|&amp;#039; .. title .. &amp;#039;}-&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
	if is_set (script) then&lt;br /&gt;
		script = format_script_value (script);									-- &amp;lt;bdi&amp;gt; tags, lang atribute, categorization, etc; returns empty string on error&lt;br /&gt;
		if is_set (script) then&lt;br /&gt;
			title = title .. &amp;#039; &amp;#039; .. script;										-- concatenate title and script title&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return title;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; G E T _ I S O 6 3 9 _ C O D E &amp;gt;------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Validates language names provided in |language= parameter if not an ISO639-1 code.  Handles the special case that is Norwegian where&lt;br /&gt;
ISO639-1 code &amp;#039;no&amp;#039; is mapped to language name &amp;#039;Norwegian Bokmål&amp;#039; by Extention:CLDR.&lt;br /&gt;
&lt;br /&gt;
Returns the language name and associated ISO639-1 code.  Because case of the source may be incorrect or different from the case that Wikimedia&lt;br /&gt;
uses, the name comparisons are done in lower case and when a match is found, the Wikimedia version (assumed to be correct) is returned along&lt;br /&gt;
with the code.  When there is no match, we return the original language name string.&lt;br /&gt;
&lt;br /&gt;
mw.language.fetchLanguageNames() will return a list of languages that aren&amp;#039;t part of ISO639-1. Names that aren&amp;#039;t ISO639-1 but that are included&lt;br /&gt;
in the list will be found if that name is provided in the |language= parameter.  For example, if |language=Samaritan Aramaic, that name will be&lt;br /&gt;
found with the associated code &amp;#039;sam&amp;#039;, not an ISO639-1 code.  When names are found and the associated code is not two characters, this function&lt;br /&gt;
returns only the Wikimedia language name.&lt;br /&gt;
&lt;br /&gt;
Adapted from code taken from Module:Check ISO 639-1.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function get_iso639_code (lang)&lt;br /&gt;
	if &amp;#039;norwegian&amp;#039; == lang:lower() then											-- special case related to Wikimedia remap of code &amp;#039;no&amp;#039; at Extension:CLDR&lt;br /&gt;
		return &amp;#039;挪威语&amp;#039;, &amp;#039;no&amp;#039;;													-- Make sure rendered version is properly capitalized&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local languages = mw.language.fetchLanguageNames (mw.getContentLanguage():getCode(), &amp;#039;all&amp;#039;)				-- get a list of language names known to Wikimedia&lt;br /&gt;
																				-- (&amp;#039;all&amp;#039; is required for North Ndebele, South Ndebele, and Ojibwa)&lt;br /&gt;
	local langlc = mw.ustring.lower (lang);										-- lower case version for comparisons&lt;br /&gt;
	&lt;br /&gt;
	for code, name in pairs (languages) do										-- scan the list to see if we can find our language&lt;br /&gt;
		if langlc == mw.ustring.lower (name) then&lt;br /&gt;
			if 2 ~= code:len() then												-- ISO639-1 codes only&lt;br /&gt;
				return name;													-- so return the name but not the code&lt;br /&gt;
			end&lt;br /&gt;
			return name, code;													-- found it, return name to ensure proper capitalization and the ISO639-1 code&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return lang;																-- not valid language; return language in original case and nil for ISO639-1 code&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; L A N G U A G E _ P A R A M E T E R &amp;gt;------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Get language name from ISO639-1 code value provided.  If a code is valid use the returned name; if not, then use the value that was provided with the language parameter.&lt;br /&gt;
&lt;br /&gt;
There is an exception.  There are three ISO639-1 codes for Norewegian language variants.  There are two official variants: Norwegian Bokmål (code &amp;#039;nb&amp;#039;) and&lt;br /&gt;
Norwegian Nynorsk (code &amp;#039;nn&amp;#039;).  The third, code &amp;#039;no&amp;#039;,  is defined by ISO639-1 as &amp;#039;Norwegian&amp;#039; though in Norway this is pretty much meaningless.  However, it appears&lt;br /&gt;
that on enwiki, editors are for the most part unaware of the nb and nn variants (compare page counts for these variants at Category:Articles with non-English-language external links.&lt;br /&gt;
&lt;br /&gt;
Because Norwegian Bokmål is the most common language variant, Media wiki has been modified to return Norwegian Bokmål for ISO639-1 code &amp;#039;no&amp;#039;. Here we undo that and&lt;br /&gt;
return &amp;#039;Norwegian&amp;#039; when editors use |language=no.  We presume that editors don&amp;#039;t know about the variants or can&amp;#039;t descriminate between them.&lt;br /&gt;
&lt;br /&gt;
See Help talk:Citation Style_1#An ISO 639-1 language name test&lt;br /&gt;
&lt;br /&gt;
When |language= contains a valid ISO639-1 code, the page is assigned to the category for that code: Category:Norwegian-language sources (no) if&lt;br /&gt;
the page is a mainspace page and the ISO639-1 code is not &amp;#039;en&amp;#039;.  Similarly, if the  parameter is |language=Norwegian, it will be categorized in the same way.&lt;br /&gt;
&lt;br /&gt;
This function supports multiple languages in the form |language=nb, French, th where the language names or codes are separated from each other by commas.&lt;br /&gt;
&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function language_parameter (lang)&lt;br /&gt;
	local code;																	-- the ISO639-1 two character code&lt;br /&gt;
	local name;																	-- the language name&lt;br /&gt;
	local language_list = {};													-- table of language names to be rendered&lt;br /&gt;
	local names_table = {};														-- table made from the value assigned to |language=&lt;br /&gt;
	&lt;br /&gt;
	if not is_set (lang) then&lt;br /&gt;
		return &amp;#039;&amp;#039;;&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	names_table = mw.text.split (lang, &amp;#039;%s*,%s*&amp;#039;);								-- names should be a comma separated list&lt;br /&gt;
&lt;br /&gt;
	for _, lang in ipairs (names_table) do										-- reuse lang&lt;br /&gt;
		&lt;br /&gt;
		name = fetchLocalLanguageName (lang:lower());							-- local table first&lt;br /&gt;
		&lt;br /&gt;
		if not is_set (name) then&lt;br /&gt;
			if lang:match (&amp;#039;^%a%a%-&amp;#039;) or 2 == lang:len() then					-- ISO639-1 language code are 2 characters (fetchLanguageName also supports 3 character codes)&lt;br /&gt;
				if lang:match (&amp;#039;^zh-&amp;#039;) then&lt;br /&gt;
					name = mw.language.fetchLanguageName (lang:lower(), lang:lower());&lt;br /&gt;
				else&lt;br /&gt;
					if not is_set (name) then&lt;br /&gt;
						name = mw.language.fetchLanguageName (lang:lower(), mw.getContentLanguage():getCode());			&lt;br /&gt;
																				-- get ISO 639-1 language name if Language is a proper code&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		if is_set (name) then													-- if Language specified a valid ISO639-1 code&lt;br /&gt;
			code = lang:lower();												-- save it&lt;br /&gt;
		else&lt;br /&gt;
			name, code = get_iso639_code (lang);								-- attempt to get code from name (assign name here so that we are sure of proper capitalization)&lt;br /&gt;
		end&lt;br /&gt;
	&lt;br /&gt;
		if is_set (code) then&lt;br /&gt;
			if &amp;#039;zh&amp;#039; ~= code and not code:match (&amp;#039;^zh-&amp;#039;) then					-- Chinese not the language&lt;br /&gt;
				add_prop_cat (&amp;#039;foreign_lang_source&amp;#039;, {name, code})&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			add_maint_cat (&amp;#039;unknown_lang&amp;#039;);										-- add maint category if not already added&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		table.insert (language_list, name);&lt;br /&gt;
		name = &amp;#039;&amp;#039;;																-- so we can reuse it&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	code = #language_list														-- reuse code as number of languages in the list&lt;br /&gt;
	if 2 &amp;gt;= code then&lt;br /&gt;
		name = table.concat (language_list, &amp;#039;及&amp;#039;)								-- insert &amp;#039;及&amp;#039; between two language names&lt;br /&gt;
	elseif 2 &amp;lt; code then&lt;br /&gt;
		language_list[code] = &amp;#039;及&amp;#039; .. language_list[code];						-- prepend last name with &amp;#039;及&amp;#039;&lt;br /&gt;
		name = table.concat (language_list, &amp;#039;、&amp;#039;);								-- and concatenate with &amp;#039;&amp;lt;comma&amp;gt;&amp;lt;space&amp;gt;&amp;#039; separators&lt;br /&gt;
		name = name:gsub (&amp;#039;、及&amp;#039;, &amp;#039;及&amp;#039;, 1);&lt;br /&gt;
	end&lt;br /&gt;
	return (&amp;quot; &amp;quot; .. wrap_msg (&amp;#039;language&amp;#039;, name));								-- otherwise wrap with &amp;#039;(in ...)&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
--[[--------------------------&amp;lt; S E T _ S E L E C T E D _ M O D U L E S &amp;gt;--------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
local function set_selected_modules (utilities_page_ptr, error_page_ptr)&lt;br /&gt;
	&lt;br /&gt;
	is_set = utilities_page_ptr.is_set;											-- import functions from selected Module:Citation/CS1/Utilities module&lt;br /&gt;
	in_array = utilities_page_ptr.in_array;&lt;br /&gt;
	wrap_style = utilities_page_ptr.wrap_style;&lt;br /&gt;
	wrap_msg = utilities_page_ptr.wrap_msg;&lt;br /&gt;
	&lt;br /&gt;
	add_prop_cat = error_page_ptr.add_prop_cat;									-- import functions from selected Module:Citation/CS1/Error module&lt;br /&gt;
	add_maint_cat = error_page_ptr.add_maint_cat;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
--[[--------------------------&amp;lt; E X P O R T E D   F U N C T I O N S &amp;gt;------------------------------------------&lt;br /&gt;
]]&lt;br /&gt;
&lt;br /&gt;
return {&lt;br /&gt;
	script_concatenate = script_concatenate,&lt;br /&gt;
	language_parameter =language_parameter,&lt;br /&gt;
	&lt;br /&gt;
	set_selected_modules = set_selected_modules&lt;br /&gt;
	}&lt;/div&gt;</summary>
		<author><name>imported&gt;Shizhao</name></author>
	</entry>
</feed>