テンプレート:Zh/docのソースを表示
←
テンプレート:Zh/doc
ナビゲーションに移動
検索に移動
あなたには「このページの編集」を行う権限がありません。理由は以下の通りです:
この操作は、次のグループに属する利用者のみが実行できます:
登録利用者
。
このページのソースの閲覧やコピーができます。
{{Documentation subpage}} {{Lua|Module:Zh}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> ==About== There were once [http://en.wikipedia.org/w/index.php?title=Template:Zh-all&oldid=308206352 a large number] of Chinese Romanization templates: {{tl|zh-stp}} could display simplified and traditional characters and Hanyu Pinyin; {{tl|zh-cpwl}} could display general Han characters, pinyin and Wade-Giles, and literal translations; {{tl|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, and Pe̍h-ōe-jī romanizations. It supports reordering the output for the most commonly used orders (others orderings can easily be added). ==Usage== ===Parameters=== To use the template, start with {{tlx|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: {|class="wikitable" |- ! Parameter !! Description !! Example |- | {{para|c}} || [[Chinese language|Chinese]] || {{tlx|zh|c{{=}}中国}}<br/>{{zh|c=中国}} |- | {{para|s}} || [[Simplified Chinese characters|simplified Chinese]]<ref name="same">If {{para|s}} and {{para|t}} are both given and are the same (i.e., if the simplified and traditional characters are the same), instead of showing both the template will just show "[[Chinese language|Chinese]]: <code><nowiki>{{{s}}}</nowiki></code>"</ref> || {{tlx|zh|s{{=}}中国}}<br/>{{zh|s=中国}} |- | {{para|t}} || [[Traditional Chinese characters|traditional Chinese]]<ref name="same"/> || {{tlx|zh|t{{=}}中國}}<br/>{{zh|t=中國}} |- | {{para|p}} or {{para|hp}} || [[pinyin]]<ref>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".</ref> || {{tlx|zh|p{{=}}zhōngguó}}<br/>{{zh|p=zhōngguó}} |- | {{para|tp}} || [[Tongyong Pinyin]] || {{tlx|zh|tp{{=}}Jhongguó}}<br/>{{zh|tp=Jhongguó}} |- | {{para|w}} || [[Wade–Giles]] || {{tlx|zh|w{{=}}Chung¹kuo²}}<br/>{{zh|w=Chung¹kuo²}} |- | {{para|j}} || [[Jyutping]] || {{tlx|zh|j{{=}}Gwong²zau¹}}<br/>{{zh|j=Gwong²zau¹}} |- | {{para|cy}} || [[Yale romanization of Cantonese|Cantonese Yale]] || {{tlx|zh|cy{{=}}Gwóngjàu}}<br/>{{zh|cy=Gwóngjàu}} |- | {{para|poj}} || [[Pe̍h-ōe-jī]] || {{tlx|zh|poj{{=}}Tâi-tiong-kōan}}<br/>{{zh|poj=Tâi-tiong-kōan}} |- | {{para|zhu}} || [[Bopomofo|Zhuyin Fuhao]] || {{tlx|zh|zhu{{=}}ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ}}<br/>{{zh|zhu=ㄊㄠˊ ㄩㄢˊ ㄒㄧㄢˋ}} |- | {{para|l}} || literal meaning || {{tlx|zh|l{{=}}Middle Kingdom}}<br/>{{zh|l=Middle Kingdom}} |- | {{para|labels}} || Display language labels || See [[#Label options|below]] |- | {{para|links}} || Display language links|| See [[#Label options|below]] |- | {{para|first}} || Override default ordering|| See [[#Ordering|below]] |- | {{para|scase}} || use sentence case|| See [[#Label options|below]] |- |} <references/> ===Label options=== Add {{para|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. :{{tlx |zh | t{{=}}中國 | s{{=}}中国 | hp{{=}}Zhōngguó | tp{{=}}Jhongguó | labels{{=}}no}} :{{zh | t=中國 | s=中国 | hp=Zhōngguó | tp=Jhongguó | labels=no}} Add {{para|links|no}} anywhere in the template to suppress label links. This is for preventing [[WP:overlinking|overlinking]] in an article or section where the template is used repeatedly. :{{tlx |zh | t{{=}}中國 | s{{=}}中国 | hp{{=}}Zhōngguó | tp{{=}}Jhongguó | links{{=}}no}} :{{zh | t=中國 | s=中国 | hp=Zhōngguó | tp=Jhongguó | links=no}} Add {{para|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. :{{tlx |zh | t{{=}}中國 | s{{=}}中国 | hp{{=}}Zhōngguó | tp{{=}}Jhongguó | scase{{=}}yes}} :{{zh | t=中國 | s=中国 | hp=Zhōngguó | tp=Jhongguó | scase=yes}} ===Ordering=== The template can be given more than one value (for example, on the article [http://en.wikipedia.org/w/index.php?title=China&oldid=314754415 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 {{para|first}}. It accepts a comma delimited list of values, though currently only two are supported (more can be added if needed) * {{para|first|t}} puts traditional Chinese before simplified Chinese, for example for Taiwan and Hong Kong topics * {{para|first|j}} puts the Cantonese Romanisations, Jyutping and Yale, before pinyin Romanisations, for Hong Kong topics * They can be combined: either {{para|first|j,t}} or {{para|first|t,j}} can be used Examples: :{{tlx |zh | t{{=}}臺北 | s{{=}}台北 | hp{{=}}Táiběi}} :{{zh | t=臺北 | s=台北 | hp=Táiběi}} :{{tlx |zh | t{{=}}臺北 | s{{=}}台北 | hp{{=}}Táiběi|first{{=}}t}} :{{zh | t=臺北 | s=台北 | hp=Táiběi|first=t}} :{{tlx |zh | t{{=}}九龍 | s{{=}}九龙 | p{{=}}Jiǔlóng||j{{=}}gau<sup>2</sup>lung<sup>4</sup>}} :{{zh | t=九龍 | s=九龙 | hp=Jiǔlóng||j=gau<sup>2</sup>lung<sup>4</sup>}} :{{tlx |zh | t{{=}}九龍 | s{{=}}九龙 | p{{=}}Jiǔlóng||j{{=}}gau<sup>2</sup>lung<sup>4</sup>|first{{=}}t, j}} :{{zh | t=九龍 | s=九龙 | hp=Jiǔlóng||j=gau<sup>2</sup>lung<sup>4</sup>|first=t, j}} 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 {{para|first|t}}. This is done by adding the article to the list <code> t1st</code> 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 {{tl|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== The following data is used by [[Wikipedia:VisualEditor|VisualEditor]] to display information about the template and its parameters. <templatedata> { "description": "A template to facilitiate consistent layout, proper formatting, categorisation and language labelling of Chinese text", "params": { "c": { "label": "Chinese", "description": "Chinese characters", "type": "string", "suggested": true }, "s": { "label": "Simplified Chinese", "description": "Simplified Chinese characters", "type": "string", "suggested": true }, "t": { "label": "Traditional Chinese", "description": "Traditional Chinese characters", "type": "string", "suggested": true }, "p": { "label": "pinyin", "description": "Hanyu Pinyin Romanisation", "type": "string" }, "tp": { "label": "Tongyong Pinyin", "description": "Tongyong Pinyin Romanisation", "type": "string" }, "w": { "label": "Wade-Giles", "description": "Wade-Giles Romanisation", "type": "string" }, "j": { "label": "Jyutping", "description": "[Cantonese] Jyutping Romanisation", "type": "string" }, "cy": { "label": "Cantonese Yale", "description": "Cantonese Yale Romanisation", "type": "string" }, "poj": { "label": "Pe̍h-ōe-jī", "description": "Pe̍h-ōe-jī Romanisation", "type": "string" }, "zhu": { "label": "Zhuyin Fuhao", "description": "Zhuyin Fuhao/Bopomofo", "type": "string" }, "l": { "label": "literally", "description": "literal [English] meaning", "type": "string" }, "labels": { "label": "Labels", "description": "Whether or not to display labels", "type": "string", "default": "yes" }, "links": { "label": "Links", "description": "Whether or not to link to the article of the specific article of the language/script/romanization", "type": "string", "default": "yes" }, "first": { "label": "ordering", "description": "'t', 'j' or 't, j' to put traditional Chinese and/or Cantonese Romanisations first", "type": "string" }, "scase": { "label": "sentence case", "description": "Capitalises the first label", "type": "string" } } } </templatedata> ==See also== * {{tlx|CJKV}}, a similar template, but with Japanese/Korean/Vietnamese functionality * {{tlx|lang}}, a general purpose template used for single items. E.g. {{tlx|lang|zh|中国}} produces similar output to {{tlx|zh|c{{=}}中国|labels{{=}}no}}. * {{tlx|Infobox Chinese}}, an infobox that supports traditional and simplified Chinese as well as other common romanizations. {{unicode templates}} <includeonly> <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[Category:Chinese multilingual support templates]] <!--[[ar:قالب:Zh-spw]] [[eo:Ŝablono:Zh-spw]] [[nl:Sjabloon:Zh-spw]] [[nn:Mall:Zh-spw]] [[no:Mall:Zh-spw]] [[ro:Format:Zh-spw]] [[simple:Template:Zh-spw]] [[sv:Mall:Zh-spw]] [[tr:Şablon:Zh-spw]] --> </includeonly>
テンプレート:Zh/doc
に戻る。
ナビゲーション メニュー
個人用ツール
ログイン
名前空間
テンプレート
議論
日本語
表示
閲覧
履歴表示
その他
検索
案内
索引
脳科学辞典について
最近完成した項目
編集履歴
執筆にあたって
引用の仕方
著作権について
免責事項
問い合わせ
各学会編集のオンライン用語辞典
About us (in English)
Twitter (BrainScienceBot)
ツール
リンク元
関連ページの更新状況
特別ページ
ページ情報
他のプロジェクト