Template:Lang-zh/doc: Difference between revisions

[checked revision][checked revision]
Content deleted Content added
Created page with "{{Documentation subpage}} <!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> {{Lua|Module:Lang-zh}} {..."
 
No edit summary
 
Line 2:
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{Lua|Module:Lang-zh}}
{{High-use| 50000}}
 
==About==
Line 19:
! Parameter !! Description !! Example
|-
| {{para|t}} || [[Wikipedia:Traditional Chinese characters|traditional Chinese]]<ref name="same"/> || {{tlx|Lang-zh|t{{=}}中國}}<br/>{{Lang-zh|t=中國}}
|-
| {{para|s}} || [[Wikipedia:Simplified Chinese characters|simplified Chinese]]<ref name="same">
If {{para|s}} and {{para|t}} are both given and are the same – if the simplified and traditional characters are identical – then they only appear once, in simplified Chinese typeface. E.g.
{{tlx|Lang-zh|s{{=}}北京|t{{=}}北京}} gives {{Lang-zh|s=北京|t=北京}}
</ref> || {{tlx|Lang-zh|s{{=}}中国}}<br/>{{Lang-zh|s=中国}}
|-
| {{para|c}}<ref name=unnamed>If only one unnamed parameter is given, it will be treated as if it were passed to {{para|c}}</ref> || [[Wikipedia:Chinese language|Chinese]] (in simplified typeface) || {{tlx|Lang-zh|c{{=}}中国}}<br/>{{Lang-zh|c=中国}}
|-
| {{para|p}} or {{para|hp}} || [[Wikipedia:pinyin|pinyin]]<ref>This will display as "Hanyu Pinyin", instead of just "pinyin", if Tongyong Pinyin is also included in the template; this way the two types of pinyin contrast and neither is treated as a "default".</ref> || {{tlx|Lang-zh|p{{=}}Zhōngguó}}<br/>{{Lang-zh|p=Zhōngguó}}
|-
| {{para|tp}} || [[Wikipedia:Tongyong Pinyin|Tongyong Pinyin]] || {{tlx|Lang-zh|tp{{=}}Jhongguó}}<br/>{{Lang-zh|tp=Jhongguó}}
|-
| {{para|w}} || [[Wikipedia:Wade–Giles|Wade–Giles]]<ref name=sup>Wade-Giles and SidneyLau romanizations use superscripted numbers for tones. The template automatically converts unsuperscripted tone numbers to superscripted ones.</ref> || {{tlx|Lang-zh|w{{=}}Chung1kuo2}}<br/>{{Lang-zh|w=Chung1kuo2}}
|-
| {{para|j}} || [[Wikipedia:Jyutping|Jyutping]] || {{tlx|Lang-zh|j{{=}}Gwong2zau1}}<br/>{{Lang-zh|j=Gwong2zau1}}
|-
| {{para|cy}} || [[Wikipedia:Yale romanization of Cantonese|Cantonese Yale]] || {{tlx|Lang-zh|cy{{=}}Gwóngjāu}}<br/>{{Lang-zh|cy=Gwóngjāu}}
|-
| {{para|sl}} || [[Wikipedia:Sidney Lau romanisation|Sidney Lau]]<ref name=sup/> || {{tlx|Lang-zh|sl{{=}}Gwong2jau1}}<br/>{{Lang-zh|sl=Gwong2jau1}}
|-
| {{para|poj}} || [[Wikipedia:Pe̍h-ōe-jī]] || {{tlx|Lang-zh|poj{{=}}Tâi-tiong-kōan}}<br/>{{Lang-zh|poj=Tâi-tiong-kōan}}
|-
| {{para|zhu}} || [[Wikipedia:Bopomofo|Zhuyin Fuhao]] || {{tlx|Lang-zh|zhu{{=}}ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ}}<br/>{{Lang-zh|zhu=ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ}}
|-
| {{para|l}} || literal meaning || {{tlx|Lang-zh|l{{=}}Middle Kingdom}}<br/>{{Lang-zh|l=Middle Kingdom}}
Line 63:
:{{Lang-zh| t=中國 | s=中国 | hp=Zhōngguó | tp=Jhongguó | labels=no}}
 
Add {{para|links|no}} anywhere in the template to suppress label links. This is for preventing [[Wikipedia:WP:overlinking|overlinking]] in an article or section where the template is used repeatedly.
:{{tlx |Lang-zh| t{{=}}中國 | s{{=}}中国 | hp{{=}}Zhōngguó | tp{{=}}Jhongguó | links{{=}}no}}
:{{Lang-zh| t=中國 | s=中国 | hp=Zhōngguó | tp=Jhongguó | links=no}}
 
Add {{para|scase|yes}} anywhere in the template to use [[Wikipedia:sentence case|sentence case]], so the first label starts with a capital letter. This allows the template to be used at the start of a sentence for example.
 
:{{tlx |Lang-zh| t{{=}}中國 | s{{=}}中国 | hp{{=}}Zhōngguó | tp{{=}}Jhongguó | scase{{=}}yes}}
Line 217:
* {{tlx|Lang}}, a general purpose template used for single items (e.g. {{tlx|Lang|zh|中国}} produces similar output to {{tlx|Lang-zh|c{{=}}中国|labels{{=}}no}})
* {{tlx|Infobox Chinese}}, an infobox that supports traditional and simplified Chinese as well as other common romanizations
* {{tlx|Old Chinese}}, for reconstructed [[Wikipedia:Old Chinese phonology|Old Chinese phonology]]
* {{tlx|Rarely-used Chinese characters}}, to describe characters that may have trouble rendering properly