Bước tới nội dung

Bản mẫu:Zh/doc

Bách khoa toàn thư mở Wikipedia

About[sửa mã nguồn]

There were once a large number of Chinese Romanization templates: {{zh-stp}} could display simplified and traditional characters and Hanyu Pinyin; {{zh-cpwl}} could display general Han characters, pinyin and Wade–Giles, and literal translations; {{zh-full}} and its sub-templates allowed more control over display order, etc..

This template was created to combine these into one template with all needed functionality. It can display (and link to) general, simplified, or traditional Han characters; literal translation; Zhuyin (Bopomofo); and the Hanyu Pinyin, Tongyong Pinyin, Wade–Giles, Jyutping, Cantonese Yale, Sidney Lau and Pe̍h-ōe-jī romanizations. It supports reordering the output for the most commonly used orders (other orderings can easily be added).

Cách sử dụng[sửa mã nguồn]

Parameters[sửa mã nguồn]

To use the template, start with {{zh}} 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:

Parameter Description Example
|hv= Hán Việt {{zh|hv=Trung Quốc}}
Hán-Việt: Trung Quốc
|c=[1] Tiếng Trung {{zh|c=中国}}
tiếng Trung: 中国
|s= Chữ Hán giản thể[2] {{zh|s=中国}}
tiếng Trung: 中国
|t= Chữ Hán phồn thể[2] {{zh|t=中國}}
tiếng Trung: 中國
|p= or |hp= Bính âm Hán ngữ[3] {{zh|p=zhōngguó}}
bính âm: zhōngguó
|tp= Bính âm Thông dụng {{zh|tp=Jhongguó}}
bính âm thông dụng: Jhongguó
|w= Wade–Giles {{zh|w=Chung¹kuo²}}
Wade–Giles: Chung¹kuo²
|j= Việt bính {{zh|j=Gwong²zau¹}}
Việt bính: Gwong²zau¹
|cy= Cantonese Yale {{zh|cy=Gwóngjàu}}
Yale Quảng Đông: Gwóngjàu
|sl= Sidney Lau {{zh|sl=Gwong²jau¹}}
Lưu Tích Tường: Gwong²jau¹
|poj= Phiên âm Bạch thoại {{zh|poj=Tâi-tiong-kōan}}
Bạch thoại tự: Tâi-tiong-kōan
|zhu= Chú âm phù hiệu {{zh|zhu=ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ}}
chú âm phù hiệu: ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ
|l= ý nghĩa {{zh|l=Middle Kingdom}}
nghĩa đen: "Middle Kingdom"
|labels= Display language labels See below
|links= Display language links See below
|first= Override default ordering See below
|scase= use sentence case See below
  1. ^ If only one unnamed parameter is given, it will be treated as if it were passed to |c=
  2. ^ a b If |s= and |t= are both given and are the same – if the simplified and traditional characters are identical – then they only appear once. E.g. {{zh|s=北京|t=北京}} gives tiếng Trung: 北京
  3. ^ 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".

Label options[sửa mã nguồn]

Add |labels=no anywhere in the template to disable labels, so only the text supplied as parameters appears, separated by semicolons. This minimises the length of the template, and can be used when the template is used more than once to lessen its impact. Disabling labels also suppresses links.

{{zh|t=中國|s=中国|hp=Zhōngguó|tp=Jhongguó|labels=no}}
中国; 中國; Zhōngguó; Jhongguó

Add |links=no anywhere in the template to suppress label links. This is for preventing overlinking in an article or section where the template is used repeatedly.

{{zh|t=中國|s=中国|hp=Zhōngguó|tp=Jhongguó|links=no}}
giản thể: 中国; phồn thể: 中國; bính âm Hán ngữ: Zhōngguó; bính âm thông dụng: Jhongguó

Add |scase=yes anywhere in the template to use 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.

{{zh|t=中國|s=中国|hp=Zhōngguó|tp=Jhongguó|scase=yes}}
Giản thể: 中国; phồn thể: 中國; bính âm Hán ngữ: Zhōngguó; bính âm thông dụng: Jhongguó

Ordering[sửa mã nguồn]

The template can be given more than one value (for example, on the article China, it has s, t, hp, tp, and w). By default, when multiple parameters are given they will be shown in the same order as the above table: first Chinese characters (simplified, then traditional), then romanizations (starting with Hanyu and Tongyong Pinyin).

This order can be overridden using |first=. It accepts a comma delimited list of values, though currently only two are supported (more can be added if needed)

  • |first=t puts traditional Chinese before simplified Chinese, for example for Taiwan and Hong Kong topics
  • |first=j puts the Cantonese Romanizations, Jyutping and Yale, before pinyin Romanizations, for Hong Kong topics
  • They can be combined: either |first=j,t or |first=t,j can be used

Examples:

{{zh|t=臺北|s=台北|hp=Táiběi}}
giản thể: 台北; phồn thể: 臺北; bính âm: Táiběi
{{zh|t=臺北|s=台北|hp=Táiběi|first=t}}
phồn thể: 臺北; giản thể: 台北; bính âm: Táiběi
{{zh|t=九龍|s=九龙|p=Jiǔlóng||j=gau2lung4}}
giản thể: 九龙; phồn thể: 九龍; bính âm: Jiǔlóng; Việt bính: gau2lung4
{{zh|t=九龍|s=九龙|p=Jiǔlóng||j=gau2lung4|first=t, j}}
phồn thể: 九龍; giản thể: 九龙; Việt bính: gau2lung4; bính âm: Jiǔlóng

It is also possible to override the default ordering for an article, so traditional Chinese appears before simplified Chinese, i.e. so all uses of the template default to |first=t. This is done by adding the article to the list t1st at the top of Module:Zh, following the formatting of the articles already there. The module is edit-protected, so you may need to use {{edit template-protected}} on the module's talk page Module talk:Zh to request an article is added, if you cannot add it yourself.

TemplateData[sửa mã nguồn]

Đây là tài liệu Dữ liệu bản mẫu cho bản mẫu này được sử dụng bởi Trình soạn thảo trực quan và các công cụ khác; xem báo cáo sử dụng tham số hàng tháng cho bản mẫu này.

Dữ liệu bản mẫu cho Zh

A template to facilitiate consistent layout, proper formatting, categorisation and language labelling of Chinese text

Tham số bản mẫu

Nên dùng bản mẫu này với các tham số đặt trên cùng một hàng.

Tham sốMiêu tảKiểuTrạng thái
tiếng Trungc 1

Chinese characters

Chuỗi dàikhuyên dùng
giản thểs

Simplified Chinese characters

Chuỗi dàikhuyên dùng
phồn thểt

Traditional Chinese characters

Chuỗi dàikhuyên dùng
bính âmp hp

Hanyu Pinyin Romanization

Chuỗi dàitùy chọn
bính âm Thông dụngtp

Tongyong Pinyin Romanization

Chuỗi dàitùy chọn
Wade-Gilesw wg

Wade-Giles Romanization

Chuỗi dàitùy chọn
Jyutpingj

[Cantonese] Jyutping Romanization

Chuỗi dàitùy chọn
Yale Quảng Đôngcy y

Cantonese Yale Romanization

Chuỗi dàitùy chọn
Sidney Lausl

Sidney Lau Romanization

Chuỗi dàitùy chọn
Pe̍h-ōe-jīpoj

Pe̍h-ōe-jī Romanization

Chuỗi dàitùy chọn
Zhuyin Fuhaozhu b

Zhuyin Fuhao/Bopomofo

Chuỗi dàitùy chọn
literallyl

literal [English] meaning

Chuỗi dàitùy chọn
Labelslabels

Whether or not to display labels

Mặc định
yes
Chuỗi dàitùy chọn
Linkslinks

Whether or not to link to the article of the specific article of the language/script/romanization

Mặc định
yes
Chuỗi dàitùy chọn
orderingfirst

't', 'j' or 't, j' to put traditional Chinese and/or Cantonese Romanizations first

Chuỗi dàitùy chọn
sentence casescase

Capitalises the first label

Chuỗi dàitùy chọn
Hán Việthv v

không có miêu tả

Không rõtùy chọn

See also[sửa mã nguồn]

  • {{CJKV}}, a similar template, but with Japanese/Korean/Vietnamese functionality
  • {{lang}}, a general purpose template used for single items. E.g. {{lang|zh|中国}} produces similar output to {{zh|c=中国|labels=no}}.
  • {{Infobox Chinese}}, an infobox that supports traditional and simplified Chinese as well as other common romanizations.

Bản mẫu:Unicode templates