Difference between revisions of "Template:CJKV/doc"

From blackwiki
Jump to navigation Jump to search
imported>Daviddwd
(links parameter doesn't exist)
imported>Daviddwd
(Labels param and scase don't exist)
Line 113: Line 113:
 
"label": "Traditional Chinese",
 
"label": "Traditional Chinese",
 
"description": "Traditional Chinese characters",
 
"description": "Traditional Chinese characters",
"type": "line",
+
"type": "string",
 
"suggested": true,
 
"suggested": true,
 
"example": "中國"
 
"example": "中國"
Line 120: Line 120:
 
"label": "Pinyin",
 
"label": "Pinyin",
 
"description": "Hanyu Pinyin Romanization",
 
"description": "Hanyu Pinyin Romanization",
"type": "line",
+
"type": "string",
"aliases": [
 
"hp"
 
],
 
 
"example": "Zhōnghuá Mínguó",
 
"example": "Zhōnghuá Mínguó",
 
"suggested": true
 
"suggested": true
Line 130: Line 127:
 
"label": "Tongyong Pinyin",
 
"label": "Tongyong Pinyin",
 
"description": "Tongyong Pinyin Romanization",
 
"description": "Tongyong Pinyin Romanization",
"type": "line",
+
"type": "string",
 
"example": "Jhonghuá Mínguó"
 
"example": "Jhonghuá Mínguó"
 
},
 
},
Line 136: Line 133:
 
"label": "Cantonese Jyutping",
 
"label": "Cantonese Jyutping",
 
"description": "Cantonese Jyutping Romanization",
 
"description": "Cantonese Jyutping Romanization",
"type": "line"
+
"type": "string"
 
},
 
},
 
"cy": {
 
"cy": {
Line 147: Line 144:
 
"description": "Wade-Giles Romanization",
 
"description": "Wade-Giles Romanization",
 
"type": "line"
 
"type": "line"
},
 
"labels": {
 
"label": "Show labels?",
 
"description": "Whether or not to display labels. Use \"no\" to suppress them.",
 
"type": "string",
 
"default": "yes",
 
"example": "no"
 
},
 
"first": {
 
"label": "ordering",
 
"description": "'t', 'j' or 't, j' to put traditional Chinese and/or Cantonese Romanizations first",
 
"type": "string",
 
"example": "\"t, j\""
 
},
 
"scase": {
 
"label": "sentence case",
 
"description": "Capitalises the first label if non-empty",
 
"type": "string"
 
 
},
 
},
 
"j": {
 
"j": {
 
"label": "Japanese",
 
"label": "Japanese",
 
"description": "Japanese kana/kanji text",
 
"description": "Japanese kana/kanji text",
"example": "中華人民共和国",
+
"example": "中華民国",
 
"type": "line"
 
"type": "line"
 
},
 
},
Line 176: Line 155:
 
"description": "Japanese Rōmaji",
 
"description": "Japanese Rōmaji",
 
"example": "Chūka jinmin kyōwa-koku",
 
"example": "Chūka jinmin kyōwa-koku",
"type": "line"
+
"type": "string"
 
},
 
},
 
"k": {
 
"k": {
Line 182: Line 161:
 
"description": "Korean language text",
 
"description": "Korean language text",
 
"example": "중화 인민 공화국",
 
"example": "중화 인민 공화국",
"type": "line"
+
"type": "string"
 
},
 
},
 
"rr": {
 
"rr": {
 
"label": "Romaja",
 
"label": "Romaja",
"description": "Korean romanization",
+
"description": "Korean romanization (Revised Romanization)",
 
"example": "Junghwa inmin gonghwaguk",
 
"example": "Junghwa inmin gonghwaguk",
"type": "line"
+
"type": "string"
 
},
 
},
 
"v": {
 
"v": {
Line 194: Line 173:
 
"description": "Vietnamese language text",
 
"description": "Vietnamese language text",
 
"example": "Trung Quốc",
 
"example": "Trung Quốc",
"type": "line"
+
"type": "string"
 
},
 
},
 
"l": {
 
"l": {

Revision as of 20:58, 23 February 2019

Usage

To use the template, start with {{CJKV}} 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=李四}}
Chinese: 李四
|p= Hanyu Pinyin {{CJKV|p=Zhōnghuá Mínguó}}
Hanyu 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}}
Japanese pronunciation: Chūka jinmin kyōwa-koku
|k= Korean {{CJKV|k=중화 인민 공화국}}
Korean: 중화 인민 공화국
|rr= Romaja {{CJKV|rr=Junghwa inmin gonghwaguk}}
Korean pronunciation: Junghwa inmin gonghwaguk
|v= Vietnamese {{CJKV|v=Trung Quốc}}
Vietnamese: Trung Quốc
|l= "literally" {{CJKV|l=China}}
"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: 이사; "foobar"

Simplified and traditional Chinese can be combined together.

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

Note that the combined Chinese parameter will overwrite existing ones.

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

More examples:

  1. {{CJKV|t=中國|s=中国|j=中國|k=중국}}
    traditional Chinese and Japanese: 中國; simplified Chinese: 中国; Korean: 중국
  2. {{CJKV|t=中國|s=中国|j=中国|k=중국}}
    traditional Chinese: 中國; simplified Chinese and Japanese: 中国; Korean: 중국
  3. {{CJKV|c=立春|j=立春|k=입춘|v=Lập xuân|l=establishment of spring}}
    Chinese and Japanese: 立春; Korean: 입춘; Vietnamese: Lập xuân; "establishment of spring"
  4. {{CJKV|t=漢族|s=汉族|p=hànzú|j=漢民族|r=kan minzoku|k=한족}}
    traditional Chinese: 漢族; simplified Chinese: 汉族; pinyin: hànzú; Japanese: 漢民族; rōmaji: kan minzoku; Korean: 한족
  5. {{CJKV|t=中華民國|s=中华民国|p=Zhōnghuá Mínguó|tp=Jhonghuá Mínguó|w=Chung-hua Min-kuo}}
    traditional Chinese: 中華民國; simplified Chinese: 中华民国; 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 (Chinese: 皇帝; pinyin: Huángdì; Japanese pronunciation: Kōtei; Korean pronunciation: Hwangje; Vietnamese: Hoàng đế)
  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: 中国の歴史; rōmaji: Chūgoku no rekishi; Korean: 중국의 역사; romaja: Junggugui Yeoksa; Vietnamese: Lịch sử Trung Quốc)

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



TemplateData

TemplateData documentation used by VisualEditor and other tools
See the monthly parameter usage report for this template.

TemplateData for CJKV

A template to facilitate consistent layout, proper formatting, categorisation and language labelling of Chinese text and its romanizations

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Chinesec

Chinese characters

Example
李四
Linesuggested
Simplified Chineses

Simplified Chinese characters

Example
中国
Linesuggested
Traditional Chineset

Traditional Chinese characters

Example
中國
Stringsuggested
Pinyinp

Hanyu Pinyin Romanization

Example
Zhōnghuá Mínguó
Stringsuggested
Tongyong Pinyintp

Tongyong Pinyin Romanization

Example
Jhonghuá Mínguó
Stringoptional
Cantonese Jyutpingcj

Cantonese Jyutping Romanization

Stringoptional
Cantonese Yalecy

Cantonese Yale Romanization

Lineoptional
Wade-Gilesw

Wade-Giles Romanization

Lineoptional
Japanesej

Japanese kana/kanji text

Example
中華民国
Lineoptional
Rōmajir

Japanese Rōmaji

Example
Chūka jinmin kyōwa-koku
Stringoptional
Koreank

Korean language text

Example
중화 인민 공화국
Stringoptional
Romajarr

Korean romanization (Revised Romanization)

Example
Junghwa inmin gonghwaguk
Stringoptional
Vietnamesev

Vietnamese language text

Example
Trung Quốc
Stringoptional
literallyl

literal [English] meaning

Example
Middle Country; China
Lineoptional