සැකිල්ල:Lang-zh
මෙම සැකිල්ල ලුවා භාවිතා කරයි: |
මෙම සැකිල්ල පිටු 60,000 පමණ භාවිතා වන නිසා සිදුකරන වෙනස් කිරීම් බොහෝ ස්ථානවලට බලපානු ඇත. ඔබ සිදුකිරීමට අදහස් කරන වෙනස්කම් මෙම සැකිල්ලට අදාළ /sandbox හෝ /testcases උපපිටුවල, හෝ ඔබගේ පරිශීලක උපපිටුවේ පළමුව සිදුකොට පරීක්ෂාකර බලන්න. එම වෙනස්කම් සිදුකිරීමට ප්රථම අදාළ සාකච්ඡා පිටුවේ ඒ පිළිබඳව සංවාදයක් ගොඩනැගීමට කාරුණික වන්න.
Transclusion count updated automatically (ප්රලේඛනය වෙතට යොමුවන්න). |
About
සංස්කරණය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).
Usage
සංස්කරණයParameters
සංස්කරණයTo use the template, start with {{Lang-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 |
---|---|---|
|t= |
traditional Chinese[1] | {{Lang-zh|t=中國}} චීන: 中國 |
|s= |
simplified Chinese[1] | {{Lang-zh|s=中国}} චීන: 中国 |
|c= [2] |
Chinese (in simplified typeface) | {{Lang-zh|c=中国}} චීන: 中国 |
|p= or |hp= |
pinyin[3] | {{Lang-zh|p=Zhōngguó}} පින්යින්: Zhōngguó |
|tp= |
Tongyong Pinyin | {{Lang-zh|tp=Jhongguó}} තොංයොං පින්යින්: Jhongguó |
|w= |
Wade–Giles[4] | {{Lang-zh|w=Chung1kuo2}} වේඩ්–ගයිල්ස්: Chung1kuo2 |
|j= |
Jyutping | {{Lang-zh|j=Gwong2zau1}} ජ්යුට්පිං: Gwong2zau1 |
|cy= |
Cantonese Yale | {{Lang-zh|cy=Gwóngjāu}} Cantonese Yale: Gwóngjāu |
|sl= |
Sidney Lau[4] | {{Lang-zh|sl=Gwong2jau1}} Sidney Lau: Gwong2jau1 |
|poj= |
Pe̍h-ōe-jī | {{Lang-zh|poj=Tâi-tiong-kōan}} Pe̍h-ōe-jī: Tâi-tiong-kōan |
|zhu= |
Zhuyin Fuhao | {{Lang-zh|zhu=ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ}} චුයින් ෆුහාඕ: ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ |
|l= |
literal meaning | {{Lang-zh|l=Middle Kingdom}} සාහිත්යමය: '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 |
- ^ 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, in simplified Chinese typeface. E.g.{{Lang-zh|s=北京|t=北京}}
gives චීන: 北京 - ^ If only one unnamed parameter is given, it will be treated as if it were passed to
|c=
- ^ 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".
- ^ a b Wade-Giles and SidneyLau romanizations use superscripted numbers for tones. The template automatically converts unsuperscripted tone numbers to superscripted ones.
Label options
සංස්කරණය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.
{{Lang-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.
{{Lang-zh|t=中國|s=中国|hp=Zhōngguó|tp=Jhongguó|links=no}}
- සරල චීන: 中国; සම්ප්රදායික චීන: 中國; Hanyu Pinyin: Zhōngguó; තොංයොං පින්යින්: 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.
{{Lang-zh|t=中國|s=中国|hp=Zhōngguó|tp=Jhongguó|scase=yes}}
- සරල චීන: 中国; සම්ප්රදායික චීන: 中國; Hanyu Pinyin: Zhōngguó; තොංයොං පින්යින්: Jhongguó
Ordering
සංස්කරණය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:
{{Lang-zh|t=臺北|s=台北|hp=Táiběi}}
- සරල චීන: 台北; සම්ප්රදායික චීන: 臺北; පින්යින්: Táiběi
{{Lang-zh|t=臺北|s=台北|hp=Táiběi|first=t}}
- සම්ප්රදායික චීන: 臺北; සරල චීන: 台北; පින්යින්: Táiběi
{{Lang-zh|t=九龍|s=九龙|p=Jiǔlóng|j=gau2lung4}}
- සරල චීන: 九龙; සම්ප්රදායික චීන: 九龍; පින්යින්: Jiǔlóng; ජ්යුට්පිං: gau2lung4
{{Lang-zh|t=九龍|s=九龙|p=Jiǔlóng|j=gau2lung4|first=t, j}}
- සම්ප්රදායික චීන: 九龍; සරල චීන: 九龙; ජ්යුට්පිං: gau2lung4; පින්යින්: 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:Lang-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:Lang-zh to request an article is added, if you cannot add it yourself.
TemplateData
සංස්කරණයTemplateData documentation used by VisualEditor and other tools
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Click here to see a monthly parameter usage report for this template based on this TemplateData.
TemplateData for Lang-zh A template to facilitate consistent layout, proper formatting, categorisation and language labelling of Chinese text and its romanizations
|
Tracking categories
සංස්කරණය- ප්රවර්ගය:Articles containing Chinese-language text (0)
- ප්රවර්ගය:Articles containing simplified Chinese-language text (25)
- ප්රවර්ගය:Articles containing traditional Chinese-language text (24)
- ප්රවර්ගය:Pages using template Zh with sup tags (1)
See also
සංස්කරණය{{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{{Lang-zh|c=中国|labels=no}}
){{Infobox Chinese}}
, an infobox that supports traditional and simplified Chinese as well as other common romanizations{{Old Chinese}}
, for reconstructed Old Chinese phonology{{Rarely-used Chinese characters}}
, to describe characters that may have trouble rendering properly