Table to map |showflags= value to the |labeln= parameter value for 

TODO: convert showflag to a comma delimited list instead of these peculiar codes?

]]
 
local label_map = {
	['bp'] = 'Bbánlám Pìngyīm',
	['bpmf'] = 'Bopomofo',
	['gan'] = 'Gan',
	['gd'] = 'Guangdong Romanization',
	['h'] = 'Hakka',
	['hsn'] = 'Xiang',
	['j'] = 'Jyutping',
	['lmz'] = 'ShanghaineseRomanization',
	['p'] = 'Hanyu Pinyin',
	['phfs'] = 'Pha̍k-fa-sṳ',
	['poj'] = 'Hokkien POJ',
	['psic'] = 'Sichuanese Pinyin',
	['tl'] = 'Tâi-lô',
	['toi'] = 'Taishanese',
	['tp'] = 'Tongyong Pinyin',
	['w'] = 'Wade–Giles',
	['wuu'] = 'Wu',
	['xej'] = 'Xiao\'erjing',
	['y'] = 'Cantonese Yale',

--showflags= value to an index into label_map for child infobox |labeln= value and to map |showflags=
vale to the correct parameter for use in child infobox |datan= paramter

Implementation deatils of |showflag= are in dispute see: Template_talk:Infobox_Chinese#Rfc_on_fixing_the_template_showflag

linked conversation is at: Template_talk:Infobox_Chinese/Archive_4#Showflag broken


local transl_map = {															-- maps |showflag= value to label from label_map table and data from matching parameter name
	['bp'] = {['label1'] = 'bp', ['data1'] = 'bp'},
	['bpmf'] = {['label1'] = 'bpmf', ['data1'] = 'bpmf'},
	['gan'] = {['label1'] = 'gan', ['data1'] = 'gan'},
	['gdp'] = {['label1'] = 'gd', ['data1'] = 'gd', ['label2'] = 'p', ['data2'] = 'p'},
	['h'] = {['label1'] = 'h', ['data1'] = 'h'},
	['hsn'] = {['label1'] = 'hsn', ['data1'] = 'hsn'},
	['j'] = {['label1'] = 'j', ['data1'] = 'j'},
	['jp'] = {['label1'] = 'j', ['data1'] = 'j', ['label2'] = 'p', ['data2'] = 'p'},
	['jy'] = {['label1'] = 'j', ['data1'] = 'j', ['label2'] = 'y', ['data2'] = 'y'},
	['jyp'] = {['label1'] = 'j', ['data1'] = 'j', ['label2'] = 'y', ['data2'] = 'y', ['label3'] = 'p', ['data3'] = 'p'},
	['lmz'] = {['label1'] = 'lmz', ['data1'] = 'lmz'},
	['p'] = {['label1'] = 'p', ['data1'] = 'p'},
	['phfs'] = {['label1'] = 'phfs', ['data1'] = 'phfs'},
	['phsn'] = {['label1'] = 'p', ['data1'] = 'p', ['label2'] = 'hsn', ['data2'] = 'hsn'},
	['pj'] = {['label1'] = 'p', ['data1'] = 'p', ['label2'] = 'j', ['data2'] = 'j'},
	['poj'] = {['label1'] = 'poj', ['data1'] = 'poj'},
	['psic'] = {['label1'] = 'p', ['data1'] = 'p', ['label2'] = 'sic', ['data2'] = 'sic'},
	['pwuu'] = {['label1'] = 'p', ['data1'] = 'p', ['label2'] = 'wuu', ['data2'] = 'wuu'},
	['py'] = {['label1'] = 'p', ['data1'] = 'p', ['label2'] = 'y', ['data2'] = 'y'},
	['tl'] = {['label1'] = 'tl', ['data1'] = 'tl'},
	['toip'] = {['label1'] = 'toi', ['data1'] = 'toi', ['label2'] = 'p', ['data2'] = 'p'},
	['tp'] = {['label1'] = 'tp', ['data1'] = 'tp'},
	['wp'] = {['label1'] = 'w', ['data1'] = 'w', ['label2'] = 'p', ['data2'] = 'p'},
	['wuu'] = {['label1'] = 'wuu', ['data1'] = 'wuu'},
	['y'] = {['label1'] = 'y', ['data1'] = 'y'},
	['yj'] = {['label1'] = 'y', ['data1'] = 'y', ['label2'] = 'j', ['data2'] = 'j'},
	['xej'] = {
		['label1'] = 'xej',
		['data1'] = 'xej',				-- ???? what to do about this; template calls }}} on this value
	['xejp'] = {
		['label1'] = 'xej',
		['data1'] = 'xej',				-- ???? template does not call }}} on this value; why?
		['label2'] = 'p',
		['data2'] = 'p'

--------------------------------------------------------------------------------------------------

local keys = {																	-- table of xscript table keys calls
	ar = 'arabic',
	bo = 'tibetan',
	hokkien = 'hokkien',
	ja = 'japanese',
	ko = 'korean',
	mn = 'mongolian',
	ru = 'russian',
	ug = 'uyghur',

--------------------------------------------------------------------------------------------

table that holds the various transcription headers and labels used by transcriptions

indexed in this table are lower case versions of the header display text without punctuation (if any)

TODO: add support for transl transliteration standard parameter; akin to 


local xscript = {
	['standard mandarin'] = {													-- lower case version of the header display text
		['header'] = 'Standard Mandarin',					-- text to be displayed if headers are displayed
		['t'] = {																-- table of labels and their associated data parameter
	['other mandarin'] = {
		['header'] = 'other Mandarin',
		['t'] = {
	['wu'] = {
		['header'] = 'Wu',
		['t'] = {
	['gan'] = {
		['header'] = 'Gan',
		['t'] = {
	['xiang'] = {
		['header'] = 'Xiang',
		['t'] = {
	['hakka'] = {
		['header'] = 'Hakka',
		['t'] = {
	['yue cantonese'] = {
		['header'] = 'Yue: Cantonese',
		['t'] = {
	['other yue'] = {
		['header'] = 'other Yue',
		['t'] = {
	['southern min'] = {
		['header'] = 'Southern Min',
		['t'] = {
	['eastern min'] = {
		['header'] = 'Eastern Min',
		['t'] = {
	['pu-xian min'] = {
		['header'] = 'Pu-Xian Min',
		['t'] = {
	['northern min'] = {
		['header'] = 'Northern Min',
		['t'] = {
	['old mandarin'] = {
		['header'] = 'Old Mandarin',
		['t'] = {
	['middle chinese'] = {
		['header'] = 'Middle Chinese',
		['t'] = {
	['old chinese'] = {
		['header'] = 'Old Chinese',
		['t'] = {

	['arabic'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['hokkien'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['japanese'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['korean'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['mongolian'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['russian'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['tibetan'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {
	['uyghur'] = {
		['header'] = nil,														-- ; doesn't use header
		['t'] = {

----------------------------------------------------------------

local ibox_zhzh_enum_params = {													-- 'p', 'hp', 'xej' are special case enum parameters
	'c', 't', 's', 'l', 'tp', 'w', 'mi', 'myr', 'psp', 'myale', 'gr', 'bpmf', 'mps',
	'zh-dungan', 'sic', 'y', 'j', 'sl', 'gd', 'hk', 'mo', 'ci', 'toi', 'gan', 'wuu', 'ouji', 'suz',
	'hsn', 'h', 'phfs', 'poj', 'tl', 'bp', 'buc', 'hhbuc', 'mblmc', 'lmz', 'teo', 'lizu', 'hain',
	'mc', 'emc', 'lmc', 'oc-bs', 'oc-zz',
	'oc-b92', 																	-- only supported in the first ibox zhzh; why?
	'lao', 'khm', 'tet'															-- not supported by ibox zh/zh why are they here?

--chinese_header= for the first ibox zh/zh 
gets filled from |name1= but the second gets its name from |altname= and then the third from |altname3=.
All of these parameter names should be replaced with |chinese_header= followed by |chinese_header2= ... like all
of the other enumerated parameters


local zh_hdr_names = {
	[2] = {'altname', 'Alternative Chinese name'},
	[3] = {'altname3', 'Second alternative Chinese name'},
	[4] = {'altname4', 'Third alternative Chinese name'},
	[5] = {'altname5', 'Fourth alternative Chinese name'},
	[6] = {'altname6', 'Fifth alternative Chinese name'},

----------------------------------------------------------------------------

return {
	ibox_zhzh_enum_params = ibox_zhzh_enum_params,
	keys = keys,
	label_map = label_map,
	transl_map = transl_map,
	xscript = xscript,
	zh_hdr_names = zh_hdr_names,