-- This module is currently used by Template:zh-hanzi-box, which is meant to be a replacement for both zh-hanzi and Hani-forms-- CSS is in MediaWiki:Common.css (search for zh-hanzi-box)localpackage={}-- This function should be publicly invoked by a template-- It takes two arguments, the first of which is required and second optional. -- The first parameter represents the simplified form of an entry. If the characters are the same in both scripts, then only the first parameter is used.-- The second parameter optionally represents the traditional form of an entry, if applicable.functionpackage.init(frame)localarguments=frame:getParent().args--local sim = arguments[1] or error("First parameter is required!")localsim=arguments[1]or""localtra=arguments[2]or""iftra==""thenreturncreate_combined_box(sim)elsereturncreate_separate_box(sim,tra)endend-- Do not call this function publicly. Do so via the init function.functioncreate_combined_box(title)localcombined_box=[=[{| class="zh-hanzi-box"! colspan="4" | [[Simplified Chinese|simpl.]] and [[Traditional Chinese|trad.]]|- | lang="cmn" class="Hani" | ]=]..title..[=[</span>|}]=]returncombined_boxend-- Do not call this function publicly. Do so via the init function.functioncreate_separate_box(simtitle,tratitle)localseparate_box=[=[{| class="zh-hanzi-box"! colspan="2" | [[Simplified Chinese|simpl.]] | lang="cmn" class="Hani" | ]=]..simtitle..[=[ </span>|- ! colspan="2" | [[Traditional Chinese|trad.]] | lang="cmn" class="Hani" | ]=]..tratitle..[=[ </span>|}]=]returnseparate_boxendreturnpackage