มอดูล:Lang/configuration

------------------------------------------------------------------------------------
local templates_t = {
	lang = 'Lang',
	langx = 'Langx',
	langxx = 'Lang-xx',
	transliteration = 'Transliteration',
	}
--fn= to nill
and then do the known-param checking on the other template parameters
local known_params_t = {
	'common_params_all_t' = {													-- these parameters common to , , and 
		'code' = true,
		'text' = true,
		'rtl' = true,
		'italic' = true,
		'italics' = true,
		'i' = true,
		'size' = true,
		'proto' = true,
		'nocat' = true,
		'cat' = true,
		'template' = true,													-- supplied by external templates to provide template name for error messaging (, etc)
		},
	
	'params_lang_t' = {														-- unique to 
		1 = true,																-- alias of |code=
		2 = true,																-- alias of |text=
		},
	'params_x_t' = {															-- common to  and 
		'translit' = true,
		'translit-std' = true,
		'translit-script' = true,
		'translation' = true,
		'lit=' = true,
		'label' = true,
		'link' = true,
		'links' = true,
		'lit' = true,
		'engvar' = true,
		},
	'params_langx_t' = {														-- unique to 
		1 = true,																-- alias of |code=
		2 = true,																-- alias of |text=
		3 = true,																-- alias of |translit=
		4 = true,																-- alias of |translation=
		},
	'params_lang_xx_t' = {													-- unique to 
		1 = true,																-- alias of |text=
		2 = true,																-- alias of |translit=
		3 = true,																-- alias of |translation=
		'script' = true,														-- these needed to override default params in  templates
		'region' = true,
		'variant' = true,
		},
	}
--engvar=gb; can, should be omitted in articles that use American English; no
need for the clutter.
local engvar_sel_t = {															-- select either UK English or US English
	'au' = 'gb_t',															-- these match IANA region codes (except in lower case)
	'ca' = 'us_t',
	'gb' = 'gb_t',
	'ie' = 'gb_t',
	'in' = 'gb_t',
	'nz' = 'gb_t',
	'us' = 'us_t',															-- default engvar
	'za' = 'gb_t'
	};
local engvar_t = {
	'gb_t' = {
		'romanisz_lc' = 'romanisation',										-- lower case
		'romanisz_uc' = 'Romanisation',										-- upper case; unused can be deleted
		'romanisz_pt' = 'romanised',											-- past tense
		},
	'us_t' = {																-- default engvar
		'romanisz_lc' = 'romanization',										-- lower case
		'romanisz_uc' = 'Romanization',										-- upper case; unused can be deleted
		'romanisz_pt' = 'romanized',											-- past tense
		}
	}
local default_engvar = 'us_t';
--

**=========================>=========================================**
these tables are for internationalization.  Messages or fragments thereof are mostly grouped by function name.
Some messages are shared by functions other than the function table that lists the message or fragment.
--------------------------------------------------------------------------------------
local keywords_t = {
	'affirmative' = 'yes',
	'negative' = 'no',
	'unset' = 'unset',
	'invert' = 'invert',
	'default' = 'default',
	}
------------------------------------------------------------------------------------
local misc_text_t = {
	'error' = 'Error',														-- make_error_msg(), tag_from_name()
	'language' = 'language',													-- make_translit(), lang_xx(), name_from_tag()
	'help' = 'help',
	}
--------------------------------------------------------------------------
local make_error_msg_t = {
	'xlit_err_cat' = 'Transliteration template errors',
	'lang_err_cat' = 'Lang and lang-xx template errors',
	'undefined' = 'undefined',
	}
	
------------------------------------------------------------------------
local parameter_validate_t = {
	'invalid_param' = 'พารามิเตอร์ไม่ถูกต้อง: |$1=',							-- $1 is parameter name
	}
------------------------------------------------------------------------
local validate_italic_t = {
	'multi_italic' = 'สามารถระบุได้เพียง |italic=, |italics= หรือ |i= อย่างใดอย่างหนึ่งเท่านั้น',
	}
	
----------------------------------------------------------------------------
local validate_text_t = {
	'no_text' = 'ไม่มีข้อความ',
	'malformed_markup' = 'ข้อความมีมาร์กอัปผิดรูปแบบ',
	'italic_markup' = 'ข้อความมีมาร์กอัปตัวเอียง',
	}
----------------------------------------------------------
local text_script_match_test_t = {
	'latn_txt_mismatch' = 'Latn text/non-Latn script subtag mismatch',
	'latn_scr_mismatch' = 'Non-latn text (pos $1)/Latn script subtag mismatch',	-- $1 identifies first offending character position
	}
----------------------------------------------------------------------------------------------
local lang_t = {
	'conflict_n_param' = 'conflicting:  and |$2=',				-- $1 is positional param number, $2 is named param; shared with _lang_xx()
	'conflict_n_param_types' = {
		'code' = 'code',
		'text' = 'text',
		'translit' = 'translit',
		},
	'invalid_proto' = 'invalid |proto=: $1',								-- _lang_xx also emits this message
	}
	
	
----------------------------------------------------------------------------------------
local lang_xx_t	= {
	'conflict_n_lit' = 'conflicting:  and |lit= or |translation=',	-- $1 is positional parameter; can be either 3 () or 4 ()
	'conflict_lit' = 'conflicting: |lit= and |translation=',
	'conflict_link' = 'conflicting: |links= and |link=',
	'invalid_xlit_std' = 'invalid translit-std',
	'romanization' = 'Romanization of',
	'translit_nonlatn' = 'transliteration text not Latin script (pos $1)',	-- _transl() also emits this message; $1 identifies the first offending character's position
	'xlit_of_latn' = 'transliteration of latn script',
	}
----------------------------------------------------------------------------
local tag_from_name_t = {
	'lang_not_found' = 'ไม่พบภาษา: $1',								-- $1 is language name parameter value
	'missing_lang_name' = 'ขาดชื่อภาษา',
	}
------------------------------------------------------------------------------------------
local transl_t = {
	'unrecog_xlit_std' = 'unrecognized transliteration standard: $1',			-- $1 is |translit_std- parameter value
	'no_text' = 'no text',
	'missing_lang_scr' = 'missing language / script code',
	'unrecog_lang_scr' = 'unrecognized language / script code: $1',			-- $1 is the language/script code
	}
--------------------------------------------------------------------------
local get_ietf_parts_t = {
	'maint_promo_cat' = 'รหัส Lang และ lang-xx เลื่อนระดับเป็น ISO 639-1|$1',		-- $1 is ISO 639-2/3 subtag
	'maint_promo_msg' = 'รหัส: $1 เลื่อนระดับเป็นรหัส: $2',						-- $1 is ISO 639-2/3 subtag, $2 is synonymous ISO 639-1 subtag
	'missing_lang_tag' = 'ไม่มีแท็กภาษา',								-- also used in _langx()
	'redundant_scr' = 'แท็กสคริปต์ซ้ำซ้อน',
	'redundant_reg' = 'แท็กภูมิภาคซ้ำซ้อน',
	'redundant_var' = 'แท็กตัวแปรซ้ำซ้อน',
	'unrecog_tag' = 'ไม่รู้จักแท็กภาษา: $1',							-- $1 is the whole language tag
	'unrecog_code' = 'ไม่รู้จักรหัสภาษา: $1',						-- $1 is code
	'unrecog_reg_code' = 'ไม่รู้จักภูมิภาค: $1 สำหรับรหัส: $2',				-- $1 is region, $2 is code
	'unrecog_scr_code' = 'ไม่รู้จักสคริปต์: $1 สำหรับรหัส: $2',				-- $1 is script, $2 is code
	'script_code' = 'สคริปต์: $1 ไม่รองรับรหัส: $2',					-- $1 is script, $2 is code
	'unrecog_var' = 'ไม่รู้จักตัวแปร: $1',								-- $1 is variant
	'unrecog_var_code' = 'ไม่รู้จักตัวแปร: $1 สำหรับรหัส: $2',				-- $1 is variant, $2 is code
	'unrecog_var_code_scr' = 'ไม่รู้จักตัวแปร: $1 สำหรับคู่รหัสสคริปต์: $2-$3',	-- $1 is variant, $2 is code, $3 is script
	'unrecog_var_code_reg' = 'ไม่รู้จักตัวแปร: $1 สำหรับคู่รหัสภูมิภาค: $2-$3',	-- $1 is variant, $2 is code, $3 is region
	'unrecog_pri' = 'ไม่รู้จักแท็กส่วนตัว: $1',							-- $1 is private tag
	}
--------------------------------------------------------------------
local language_name_get_t = {
	'deprecated_cat' = 'Lang และ lang-xx ใช้รหัส ISO 639 ที่เลิกใช้แล้ว|$1',	-- $1 is deprecated ISO 639 subtag
	'deprecated_msg' = 'รหัส: $1 เลิกใช้แล้ว',								-- $1 is deprecated ISO 639 subtag
	}
------------------------------------------------------------------------
local make_text_html_t = {
	'zxx' = 'text',															-- for zxx no linguistic content
	'collective' = 'collective text',											-- for collective languages
	'individual' = 'ข้อความภาษา',											-- for individual languages
	}
----------------------------------------------------------------------
local translation_make_t = {
	'lit_xlation' = 'การแปลตรงตัว',									-- article title fragment and html title attribute
	'lit_abbr' = 'แปลตรงตัว',
	}
----------------------------------------------------------------------------
local make_category_t = {
	'collective_cat' = 'หมวดหมู่:บทความที่มีข้อความในภาษา',						-- for collective languages
	'cat_prefix' = 'หมวดหมู่:บทความที่มี',							-- prefix for explicitly cited and individual languages
	'explicit_cat' = 'อ้างอิงอย่างชัดเจน',										-- for explicitly citing this wiki's language
	'cat_postfix' = 'ข้อความภาษา',											-- postfix for individual languages
	}
	
----------------------------------------------------------------------------
local make_translit_t = {
	'script' = 'script',
	'transliteration' = 'transliteration',
	}
--------------------------------------------------------------------------------------------
return {
	known_params_t = known_params_t,
	templates_t = templates_t,
	default_engvar = default_engvar,											-- engvar support not likely useful outside of en.wiki
	engvar_t = engvar_t,
	engvar_sel_t = engvar_sel_t,
	get_ietf_parts_t = get_ietf_parts_t,										-- messaging tables
	keywords_t = keywords_t,
	lang_t = lang_t,
	lang_xx_t = lang_xx_t,
	language_name_get_t = language_name_get_t,
	make_category_t = make_category_t,
	make_error_msg_t = make_error_msg_t,
	make_text_html_t = make_text_html_t,
	make_translit_t = make_translit_t,
	misc_text_t = misc_text_t,
	parameter_validate_t = parameter_validate_t,
	tag_from_name_t = tag_from_name_t,
	text_script_match_test_t = text_script_match_test_t,
	transl_t = transl_t,
	translation_make_t = translation_make_t,
	validate_italic_t = validate_italic_t,
	validate_text_t = validate_text_t,
	}