Template:CJKV: Difference between revisions

    From Hokuto no Ken Encyclopedia | HnKWiki
    (new)
     
    No edit summary
    Line 1: Line 1:
    <includeonly>{{ #if: {{{t|}}}{{{s|}}} | {{ #ifeq: {{{t|}}} | {{{s|}}} | {{ #ifeq: {{{t|}}} | {{{j|}}} | [[wikipedia:Chinese language|Chinese]] and [[wikipedia:Japanese language|Japanese]]: {{{t|}}} | [[wikipedia:Chinese language|Chinese]]: {{lang|zh|{{{t|}}}}} }} | {{ #if: {{{t|}}} | [[wikipedia:Traditional Chinese character|Traditional Chinese]]: {{lang|zh-Hant|{{{t|}}}}} }}{{ #ifexpr: {{ #if: {{{t|}}} | 1 | 0 }} and {{ #if: {{{s|}}} | 1 | 0 }} | &#x3b;&#x20; }}{{ #if: {{{s|}}} | [[wikipedia:Simplified Chinese characters|Simplified Chinese]]: {{lang|zh-Hans|{{{s|}}}}} }} }} }}{{ #ifexpr: ({{ #if: {{{t|}}} | 1 | 0 }} or {{ #if: {{{s|}}} | 1 | 0 }}) and ({{ #if: {{{p|}}} | 1 | 0 }} or {{ #if: {{{tp|}}} | 1 | 0 }} or {{ #if: {{{cy|}}} | 1 | 0 }} or {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }}) | &#x3b;&#x20; }}{{ #ifexpr: {{ #if: {{{p|}}} | 1 | 0 }} and {{ #if: {{{tp|}}} | 1 | 0 }} | [[wikipedia:Pinyin|Hanyu Pinyin]]: {{{p|}}}&#x3b;&#x20;[[wikipedia:Tongyong Pinyin|Tongyong Pinyin]]: {{{tp|}}} | {{ #if: {{{p|}}} | [[wikipedia:pinyin|pinyin]]: {{{p|}}} }}{{ #if: {{{tp|}}} | [[wikipedia:Tongyong Pinyin|Tongyong Pinyin]]: {{{tp|}}} }} }}{{ #ifexpr: ({{ #if: {{{p|}}} | 1 | 0 }} or {{ #if: {{{tp|}}} | 1 | 0 }}) and ({{ #if: {{{cy|}}} | 1 | 0 }} or {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }}) | &#x3b;&#x20; }}{{ #if: {{{cj|}}} | [[wikipedia:Jyutping|Cantonese Jyutping]]: {{{cj|}}} {{ #ifexpr: {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{cy|}}} | [[wikipedia:Yale Romanization#Cantonese|Cantonese Yale]]: {{{cy|}}}{{ #ifexpr: {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{w|}}} | [[wikipedia:Wade-Giles|Wade-Giles]]: {{{w|}}}{{ #ifexpr: {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #ifexpr: not ({{ #if: {{{t|}}} | 1 | 0 }} and {{ #if: {{{s|}}} | 1 | 0 }} and {{ #if: {{{j|}}} | 1 | 0 }} and {{ #ifeq: {{{t|}}} | {{{s|}}} | 1 | 0 }} and {{ #ifeq: {{{t|}}} | {{{j|}}} | 1 | 0 }}) | {{ #if: {{{j|}}} | [[wikipedia:Japanese language|Japanese]]: {{lang|ja|{{{j|}}}}}{{ #ifexpr: {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }} }}{{ #if: {{{k|}}} | [[wikipedia:Korean language|Korean]]: {{lang|ko|{{{k|}}}}}{{ #ifexpr: {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{v|}}} | [[wikipedia:Vietnamese language|Vietnamese]]: {{lang|vi|{{{v|}}}}}{{ #ifexpr: {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{l|}}} | literally: "{{{l|}}}" }}</includeonly><noinclude>
    <includeonly>{{ #if: {{{t|}}}{{{s|}}} | {{ #ifeq: {{{t|}}} | {{{s|}}} | {{ #ifeq: {{{t|}}} | {{{j|}}} | [[Chinese language|Chinese]] and [[Japanese language|Japanese]]: {{{t|}}} | [[Chinese language|Chinese]]: {{lang|zh|{{{t|}}}}} }} | {{ #if: {{{t|}}} | [[traditional Chinese character|traditional Chinese]]: {{lang|zh-Hant|{{{t|}}}}} }}{{ #ifexpr: {{ #if: {{{t|}}} | 1 | 0 }} and {{ #if: {{{s|}}} | 1 | 0 }} | &#x3b;&#x20; }}{{ #if: {{{s|}}} | [[simplified Chinese characters|simplified Chinese]]: {{lang|zh-Hans|{{{s|}}}}} }} }} }}{{ #ifexpr: ({{ #if: {{{t|}}} | 1 | 0 }} or {{ #if: {{{s|}}} | 1 | 0 }}) and ({{ #if: {{{p|}}} | 1 | 0 }} or {{ #if: {{{tp|}}} | 1 | 0 }} or {{ #if: {{{cy|}}} | 1 | 0 }} or {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }}) | &#x3b;&#x20; }}{{ #ifexpr: {{ #if: {{{p|}}} | 1 | 0 }} and {{ #if: {{{tp|}}} | 1 | 0 }} | [[Pinyin|Hanyu Pinyin]]: ''{{{p|}}}''&#x3b;&#x20;[[Tongyong Pinyin]]: ''{{{tp|}}}'' | {{ #if: {{{p|}}} | [[pinyin]]: ''{{{p|}}}'' }}{{ #if: {{{tp|}}} | [[Tongyong Pinyin]]: ''{{{tp|}}}'' }} }}{{ #ifexpr: ({{ #if: {{{p|}}} | 1 | 0 }} or {{ #if: {{{tp|}}} | 1 | 0 }}) and ({{ #if: {{{cy|}}} | 1 | 0 }} or {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }}) | &#x3b;&#x20; }}{{ #if: {{{cj|}}} | [[Jyutping|Cantonese Jyutping]]: ''{{{cj|}}}'' {{ #ifexpr: {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{cy|}}} | [[Yale Romanization#Cantonese|Cantonese Yale]]: ''{{{cy|}}}''{{ #ifexpr: {{ #if: {{{w|}}} | 1 | 0 }} or {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{w|}}} | [[Wade-Giles]]: ''{{{w|}}}''{{ #ifexpr: {{ #if: {{{j|}}} | 1 | 0 }} or {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #ifexpr: not ({{ #if: {{{t|}}} | 1 | 0 }} and {{ #if: {{{s|}}} | 1 | 0 }} and {{ #if: {{{j|}}} | 1 | 0 }} and {{ #ifeq: {{{t|}}} | {{{s|}}} | 1 | 0 }} and {{ #ifeq: {{{t|}}} | {{{j|}}} | 1 | 0 }}) | {{ #if: {{{j|}}} | [[Japanese language|Japanese]]: {{lang|ja|{{{j|}}}}}{{ #ifexpr: {{ #if: {{{k|}}} | 1 | 0 }} or {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }} }}{{ #if: {{{k|}}} | [[Korean language|Korean]]: {{lang|ko|{{{k|}}}}}{{ #ifexpr: {{ #if: {{{v|}}} | 1 | 0 }} or {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{v|}}} | {{lang-vi|{{{v|}}}}}{{ #ifexpr: {{ #if: {{{l|}}} | 1 | 0 }} | &#x3b;&#x20; }} }}{{ #if: {{{l|}}} | literally: "{{{l|}}}" }}</includeonly><noinclude>
    == Parameters ==
    {{documentation}}
    * <code>t</code> - [[wikipedia:Traditional Chinese character|Traditional Chinese]]
    * <code>s</code> - [[wikipedia:Simplified Chinese character|Simplified Chinese]]
    * <code>p</code> - [[wikipedia:Pinyin|Hanyu Pinyin]]
    * <code>tp</code> - [[wikipedia:Pinyin|Tongyong Pinyin]]
    * <code>cy</code> - [[wikipedia:Yale Romanization#Cantonese|Cantonese Yale]]
    * <code>cj</code> - [[wikipedia:Jyutping|Cantonese Jyutping]]
    * <code>w</code> - [[wikipedia:Wade-Giles|Wade-Giles]]
    * <code>j</code> - [[wikipedia:Japanese language|Japanese]]
    * <code>k</code> - [[wikipedia:Korean language|Korean]]
    * <code>v</code> - [[wikipedia:Vietnamese language|Vietnamese]]
    * <code>l</code> - "literally"
     
    All parameters are optional.
     
    == Examples ==
     
    Traditional always goes first.
    # <code><nowiki>{{CJKV|t=張三|s=张三}}</nowiki></code><br />{{CJKV|t=張三|s=张三}}
    # <code><nowiki>{{CJKV|s=张三|t=張三}}</nowiki></code><br />{{CJKV|s=张三|t=張三}}
     
    The template compares Traditional Chinese, Simplified Chinese, and Japanese Kanji automatically.
    # <code><nowiki>{{CJKV|t=李四}}</nowiki></code><br />{{CJKV|t=李四}}
    # <code><nowiki>{{CJKV|s=李四}}</nowiki></code><br />{{CJKV|s=李四}}
    # <code><nowiki>{{CJKV|t=李四|s=李四}}</nowiki></code><br />{{CJKV|t=李四|s=李四}}
    # <code><nowiki>{{CJKV|t=李四|s=李四|j=李四}}</nowiki></code><br />{{CJKV|t=李四|s=李四|j=李四}}
    # <code><nowiki>{{CJKV|t=李四|s=李四|j=李四|k=이사}}</nowiki></code><br />{{CJKV|t=李四|s=李四|j=李四|k=이사}}
    # <code><nowiki>{{CJKV|t=李四|s=李四|j=李四|k=이사|l=foobar}}</nowiki></code><br />{{CJKV|t=李四|s=李四|j=李四|k=이사|l=foobar}}
     
    More examples:
    # <code><nowiki>{{CJKV|t=立春|s=立春|p=lì chūn|j=立春|k=입춘|v=Lập xuân|l=establishment of spring}}</nowiki></code><br />{{CJKV|t=立春|s=立春|p=lì chūn|j=立春|k=입춘|v=Lập xuân|l=establishment of spring}}
    # <code><nowiki>{{CJKV|t=中華民國|s=中华民国|p=Zhōnghuá Mínguó|tp=Jhonghuá Mínguó|w=Chung-hua Min-kuo}}</nowiki></code><br />{{CJKV|t=中華民國|s=中华民国|p=Zhōnghuá Mínguó|tp=Jhonghuá Mínguó|w=Chung-hua Min-kuo}}
     
    [[Category:Chinese multilingual support templates|{{PAGENAME}}]]
    </noinclude>
    </noinclude>

    Revision as of 08:45, 28 July 2011

    Template documentation (for the above template, sometimes hidden or invisible)

    Usage

    To use the template, start with Template:Tld and add any parameters you like, along with what you want to be displayed. The template will display all, and only, the parameters that you give it. The following parameters are supported:

    Parameters
    Parameter Description Example
    |t= traditional Chinese {{CJKV|t=李四}}
    traditional Chinese: 李四
    |s= simplified Chinese {{CJKV|s=李四}}
    simplified Chinese: 李四
    |c= Chinese {{CJKV|c=李四}}
    |p= Hanyu Pinyin {{CJKV|p=Zhōnghuá Mínguó}}
    pinyin: Zhōnghuá Mínguó
    |tp= Tongyong Pinyin {{CJKV|tp=Jhonghuá Mínguó}}
    Tongyong Pinyin: Jhonghuá Mínguó
    |cy= Cantonese Yale {{CJKV|cy=lei5 sei3}}
    Cantonese Yale: lei5 sei3
    |cj= Cantonese Jyutping {{CJKV|cj=lei5 sei3}}
    Cantonese Jyutping: lei5 sei3
    |w= Wade–Giles {{CJKV|w=Chung-hua Min-kuo}}
    Wade-Giles: Chung-hua Min-kuo
    |j= Japanese {{CJKV|j=中華人民共和国}}
    Japanese: 中華人民共和国
    |r= Rōmaji {{CJKV|r=Chūka jinmin kyōwa-koku}}
    |k= Korean {{CJKV|k=중화 인민 공화국}}
    Korean: 중화 인민 공화국
    |rr= Romaja {{CJKV|rr=Junghwa inmin gonghwaguk}}
    |v= Vietnamese {{CJKV|v=Trung Quốc}}
    Template:Lang-vi
    |l= "literally" {{CJKV|l=China}}
    literally: "China"

    (Note: "Japanese pronunciation" or "Korean pronunciation" will appear, instead of "rōmaji" or "romaja", if their Japanese and Korean parameters are missing respectively. See examples 6 and 7.)

    All parameters are optional.

    Examples

    Traditional Chinese always goes first.

    1. {{CJKV|t=張三|s=张三}}
      traditional Chinese: 張三; simplified Chinese: 张三
    2. {{CJKV|s=张三|t=張三}}
      traditional Chinese: 張三; simplified Chinese: 张三

    This template compares traditional Chinese, simplified Chinese, and Japanese Kanji automatically.

    1. {{CJKV|t=李四}}
      traditional Chinese: 李四
    2. {{CJKV|s=李四}}
      simplified Chinese: 李四
    3. {{CJKV|t=李四|s=李四}}
      Chinese: 李四
    4. {{CJKV|t=李四|s=李四|j=李四}}
      Chinese and Japanese: 李四;
    5. {{CJKV|t=李四|s=李四|j=李四|k=이사}}
      Chinese and Japanese: 李四; Korean: 이사
    6. {{CJKV|t=李四|s=李四|j=李四|k=이사|l=foobar}}
      Chinese and Japanese: 李四; Korean: 이사; literally: "foobar"

    Simplified and traditional Chinese can be combined together.

    1. {{CJKV|t=皇居|s=皇居|j=皇居|k=고쿄}}
      Chinese and Japanese: 皇居; Korean: 고쿄
    2. {{CJKV|c=皇居|j=皇居|k=고쿄}}
      Japanese: 皇居; Korean: 고쿄
    3. {{CJKV|c=皇居|j=皇居|k=고쿄|l=Imperial Residence}}
      Japanese: 皇居; Korean: 고쿄; literally: "Imperial Residence"

    Note that the combined Chinese parameter will overwrite existing ones.

    1. {{CJKV|t=黃飛鴻|s=黄飞鸿|c=黄飞鸿|j=黄飛鴻|k=황비홍}}
      traditional Chinese: 黃飛鴻; simplified Chinese: 黄飞鸿; Japanese: 黄飛鴻; Korean: 황비홍
      is equivalent to
    2. {{CJKV|c=黄飞鸿|j=黄飛鴻|k=황비홍}}
      Japanese: 黄飛鴻; Korean: 황비홍

    More examples:

    1. {{CJKV|t=中國|s=中国|j=中國|k=중국}}
      traditional Chinese: 中國; simplified Chinese: 中国; Japanese: 中國; Korean: 중국
    2. {{CJKV|t=中國|s=中国|j=中国|k=중국}}
      traditional Chinese: 中國; simplified Chinese: 中国; Japanese: 中国; Korean: 중국
    3. {{CJKV|c=立春|j=立春|k=입춘|v=Lập xuân|l=establishment of spring}}
      Japanese: 立春; Korean: 입춘; Template:Lang-vi; literally: "establishment of spring"
    4. {{CJKV|t=漢族|s=汉族|p=hànzú|j=漢民族|r=kan minzoku|k=한족}}
      traditional Chinese: 漢族; simplified Chinese: 汉族; pinyin: hànzú; Japanese: 漢民族; Korean: 한족
    5. {{CJKV|t=中華民國|s=中华民国|p=Zhōnghuá Mínguó|tp=Jhonghuá Mínguó|w=Chung-hua Min-kuo}}
      traditional Chinese: 中華民國; simplified Chinese: 中华民国; Hanyu Pinyin: Zhōnghuá Mínguó; Tongyong Pinyin: Jhonghuá Mínguó; Wade-Giles: Chung-hua Min-kuo
    6. '''Emperor''' ({{CJKV|c=皇帝|p=Huángdì|r=Kōtei|rr=Hwangje|v=Hoàng đế}})
      Emperor (pinyin: Huángdì; Template:Lang-vi)
    7. '''History of China''' ({{CJKV|t=中國歷史|s=中国历史|p=Zhōngguó lìshǐ|j=中国の歴史|r=Chūgoku no rekishi|k=중국의 역사|rr=Junggugui Yeoksa|v=Lịch sử Trung Quốc}})
      History of China (traditional Chinese: 中國歷史; simplified Chinese: 中国历史; pinyin: Zhōngguó lìshǐ; Japanese: 中国の歴史; Korean: 중국의 역사; Template:Lang-vi)

    See also

    • {{Infobox Chinese}} - infobox template supports traditional, simplified Chinese as well as other common romanizations.
    • {{zh}} - inline template supports traditional, simplified Chinese as well as other common romanizations.


    Template:Unicode templates

    Visit Template:CJKV/doc to edit this text! (How does this work?)
    Done editing it? Refresh this page! (Why?)