Difference between revisions of "Template:Zh"
From Self-sufficiency
(update) |
|||
Line 1: | Line 1: | ||
− | {{ | + | <noinclude>{{esoteric}} |
+ | </noinclude><!-- | ||
+ | |||
+ | If no parameter is named, default to giving Chinese | ||
+ | |||
+ | -->{{#if:{{{c|}}}{{{s|}}}{{{t|}}}{{{p|}}}{{{hp|}}}{{{tp|}}}{{{w|}}}{{{wg|}}}{{{j|}}}{{{y|}}}{{{cy|}}}{{{poj|}}}{{{b|}}}{{{zhu|}}}{{{l|}}}| |{{Language with name|zh|Chinese|{{{1}}}|links={{{links|}}}}}}}<!-- | ||
+ | |||
+ | |||
+ | General Chinese | ||
+ | |||
+ | -->{{#if:{{{c|}}}|{{Language with name|zh|Chinese|{{{c|{{{1}}}}}}|links={{{links|}}}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{tp|}}}{{{hp|{{{p|}}}}}}{{{t|}}}{{{s|}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}<!-- | ||
+ | |||
+ | Make traditional display first if specified; otherwise, do nothing | ||
+ | |||
+ | -->{{#ifeq:{{{first|}}}|t|{{#if:{{{t|}}}|{{#ifeq:{{{links|}}}|no|traditional Chinese|[[Traditional Chinese characters|traditional Chinese]]}}: {{lang|zh-Hant|{{{t}}}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{tp|}}}{{{hp|{{{p|}}}}}}{{{b|{{{zhu|}}}}}}{{{s|}}}|{{;}} }} | ||
+ | }}}}<!-- | ||
+ | |||
+ | Simplified Chinese | ||
+ | |||
+ | -->{{#if:{{{s|}}}|{{#ifeq:{{{links|}}}|no|simplified Chinese|[[Simplified Chinese characters|simplified Chinese]]}}: {{lang|zh-Hans|{{{s}}}}}{{#if:{{{t|}}}|{{#ifeq:{{{first|}}}|t|{{#if:{{{l|}}}{{{poj|}}}{{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{tp|}}}{{{p|}}}{{{b|{{{zhu|}}}}}}|{{;}} }}|{{#if:{{{l|}}}{{{poj|}}}{{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{tp|}}}{{{p|}}}{{{t|}}}{{{b|{{{zhu|}}}}}}|{{;}} }}}}|{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{tp|}}}{{{p|}}}{{{b|{{{zhu|}}}}}}|{{;}} }}}} | ||
+ | }}<!-- | ||
+ | |||
+ | Traditional Chinese | ||
+ | |||
+ | -->{{#ifeq:{{{first|}}}|t| |{{#if:{{{t|}}}|{{#ifeq:{{{links|}}}|no|traditional Chinese|[[Traditional Chinese characters|traditional Chinese]]}}: {{lang|zh-Hant|{{{t}}}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{tp|}}}{{{hp|{{{p|}}}}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}}}<!-- | ||
+ | |||
+ | Make tongyong display first if specified; otherwise, do nothing | ||
+ | |||
+ | -->{{#ifeq:{{{first|}}}|t|{{#if:{{{tp|}}}|{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}Tongyong Pinyin{{#ifeq:{{{links|}}}|no| |]]}}: {{{tp}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{hp|{{{p|}}}}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}}}<!-- | ||
+ | |||
+ | Pinyin | ||
+ | |||
+ | -->{{#if:{{{hp|{{{p|}}}}}}|<!-- | ||
+ | If Tongyang vs. Hanyu: | ||
+ | -->{{#if:{{{tp|}}}|{{#ifeq:{{{links|}}}|no|Hanyu Pinyin|[[Hanyu Pinyin]]}}|<!-- | ||
+ | If Jyutping vs. Mandarin: | ||
+ | -->{{#if:{{{j|}}}|{{#ifeq:{{{links|}}}|no|Mandarin Pinyin|[[Hanyu Pinyin|Mandarin Pinyin]]}}|<!-- | ||
+ | Else: | ||
+ | -->{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}pinyin{{#ifeq:{{{links|}}}|no| |]]}}}}}}: {{#ifeq:{{{noital|}}}|yes| |<em>}}{{{p|{{{hp}}}}}}{{#ifeq:{{{noital|}}}|yes| |</em>}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{b|{{{zhu|}}}}}}|{{;}} |{{#if:{{{tp|}}}|{{#ifeq:{{{first|}}}|t| |{{;}} }}}}}} | ||
+ | }}<!-- | ||
+ | |||
+ | Tongyong Pinyin | ||
+ | |||
+ | -->{{#ifeq:{{{first|}}}|t| |{{#if:{{{tp|}}}|{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}Tongyong Pinyin{{#ifeq:{{{links|}}}|no| |]]}}: {{{tp}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{w|{{{wg|}}}}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}}}<!-- | ||
+ | |||
+ | Wade–Giles | ||
+ | |||
+ | -->{{#if:{{{w|{{{wg|}}}}}}|{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}Wade–Giles{{#ifeq:{{{links|}}}|no| |]]}}: {{{w}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{j|}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}<!-- | ||
+ | |||
+ | Jyutping | ||
+ | |||
+ | -->{{#if:{{{j|}}}|{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}Jyutping{{#ifeq:{{{links|}}}|no| |]]}}: {{{j}}}{{#if:{{{l|}}}{{{poj|}}}{{{cy|{{{y|}}}}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}<!-- | ||
+ | |||
+ | Cantonese Yale | ||
+ | |||
+ | -->{{#if:{{{cy|{{{y|}}}}}}|{{#ifeq:{{{links|}}}|no|Cantonese Yale|[[Yale Romanization#Cantonese|Cantonese Yale]]}}: {{{cy|{{{y|}}}}}}{{#if:{{{l|}}}{{{poj|}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}<!-- | ||
+ | |||
+ | Pe̍h-ōe-jī | ||
+ | |||
+ | -->{{#if:{{{poj|}}}|{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}Pe̍h-ōe-jī{{#ifeq:{{{links|}}}|no| |]]}}: {{{poj}}}{{#if:{{{l|}}}{{{b|{{{zhu|}}}}}}|{{;}} }} | ||
+ | }}<!-- | ||
+ | |||
+ | Zhuyin Fuhao | ||
+ | |||
+ | -->{{#if:{{{b|{{{zhu|}}}}}}|{{#ifeq:{{{links|}}}|no| |{{!(}}{{!(}}}}Zhuyin Fuhao{{#ifeq:{{{links|}}}|no| |]]}}: {{{b|{{{zhu}}}}}}{{#if:{{{l|}}}|{{;}} }} | ||
+ | }}<!-- | ||
+ | |||
+ | Literal | ||
+ | |||
+ | -->{{#if:{{{l|}}}|literally "{{{l}}}"}}<noinclude> | ||
+ | {{documentation}} | ||
+ | </noinclude> |
Revision as of 02:12, 2 September 2010
40x40px | This template employs intricate features of template syntax. You are encouraged to familiarise yourself with its setup and parser functions before editing the template. If your edit causes unexpected problems, please undo it quickly, as this template may appear on a large number of pages. Remember that you can conduct experiments, and should test all improvements, in either the general Template sandbox or your user space before changing anything here. |
[edit]
Documentation