模板:Langx
外觀
| 此模板不應在引用模板中使用,如引文格式1,因為其包含污染引用模板生成的COinS元數據的標記,參見維基百科中的COinS。 |
| 本模板使用 Lua 語言: |
| Language templates |
|---|
| 語言 (ISO 639) |
|
| 文字 (ISO 15924) |
|
| Wiktionary links |
|
| Other |
|
| Data |
用法
[編輯原始碼]語言模板用來標註特定內容的語言。IETF語言標籤和外文內容是必填參數。內容將根據en:Wikipedia:Manual of Style/Text formatting#Foreign terms被格式化,拉丁字母為基礎的語言會使用斜體,其他為正常字體。
此模板通常放在外文短語或術語之後用以標註原文。
- 參數
|links=no禁止語言名稱被內部連結。 - 參數
|translit=allows for a romanization to be identified. This parameter is not supported by{{langx|<tag>|...}}templates for languages that are already written in Latin script. - 參數
|lit=允許給出直譯。
參數
[編輯原始碼]| 參數 | 定義 | 受影響於 | 別名 |
|---|---|---|---|
|1= |
The IETF language tag for the content in |text= |
Template:Sdash | |code=
|
|text= |
The non-English text | Template:Sdash | |2=
|
|translit= |
The Latin script transliteration of the content in |text= |
Template:Sdash | |3=
|
|translit-std= |
The standard used for the transliteration of the value of |translit=; accepted values are: Template:Param value, Template:Param value, Template:Param value, Template:Param value, Template:Param value |
Template:Sdash | |
|translit-script= |
The transliteration standard's script identifier | Template:Sdash | |
|translation= |
The literal English translation or gloss of the content in |text= |
Template:Sdash | |lit=, |4=
|
|label= |
The label to be used instead of template-provided language label. May be wikilinked. Special keyword Template:Param value causes the template to render without any labels (including transliteration and translation labels) | Template:Sdash | |
|link= |
Links language name and static text associated with |translit= and |translation=. Defaults to Template:Param value. Accepted values are: Template:Param value, Template:Param value; |link=no does not unlink wikilinked labels set by |label= |
Template:Sdash | |links=
|
|proto= |
Accepted values are: Template:Param value (default) or Template:Param value (default for private-use language tags with the Template:Param value subtags); when Template:Param value (default or explicit), prefixes rendered text with an asterisk indicating 'unattested' | Template:Sdash | |
|script= |
(Deprecated – include script subtag in |1=) IETF language script subtag; sometimes set by the template when the language of the content in |text= uses more than one writing system; always four alpha characters; a value of Template:Param value (Template:Em "Latin"!) forces italic rendering unless overridden by |italic=; overrides |rtl= |
|italic= |
|
|region= |
(Deprecated – include region subtag in |1=) IETF language region subtag |
Template:Sdash | |
|variant= |
(Deprecated – include variant subtag in |1=) IETF language variant subtag |
Template:Sdash | |
|rtl= |
Template:Param value indicates that the writing system used for the content in |text= is right-to-left; accepted values are: Template:Param value (default), Template:Param value |
|script= |
|
|italic= |
Template:Crossref; accepted values are: Template:Param value, Template:Param value, Template:Param value, Template:Param value, Template:Param value | Template:Sdash | |italics=, |i=
|
|size= |
Specifies font size of the content in |text=; use a value suitable for use with the CSS font-size property; this should almost always be a relative value supplied in Template:Param value or Template:Param value units, not a fixed Template:Param value value. |
Template:Sdash | |
|engvar= |
Selects English variant spelling of 'romanised' or 'romanized' (default) according to the country specified; accepted values are: Template:Param value (Australia), Template:Param value (Canada), Template:Param value (Great Britain), Template:Param value (Ireland), Template:Param value (India), Template:Param value (New Zealand), Template:Param value (United States), Template:Param value (South Africa) | Template:Sdash | |
|cat= |
Inhibits automatic categorization; mirror version of |nocat=; accepted values are: Template:Param value, Template:Param value, Template:Param value, Template:Param value, Template:Param value, Template:Param value |
Template:Sdash | |
|nocat= |
Inhibits automatic categorization; mirror version of |cat=; accepted values are: Template:Param value, Template:Param value, Template:Param value, Template:Param value, Template:Param value, Template:Param value |
Template:Sdash |
|italic=值 |
描述 | 範例代碼 | 結果 | HTML標記 |
|---|---|---|---|---|
|
|
{{Langx|ru|тундра}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
|
{{Langx|ru|tûndra}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]標記有誤;需要script子標籤Template:Pval。 | ||
{{Langx|fr|toundra}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
{{Langx|ru-latn|tûndra}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
| Template:Param value | {{Langx|ru|тундра|italic=default}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| |
{{Langx|fr|toundra|italic=default}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
{{Langx|ru-latn|tûndra|italic=default}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
| Template:Param value |
|
{{Langx|ru|тундра|italic=no}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
|
{{Langx|fr|toundra|italic=no}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
{{Langx|ru-latn|tûndra|italic=no}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
''{{Langx/sandbox|ru-latn|tûndra|italic=no}}''
|
Template:Langx/sandbox | ''[[:Template:Langx/sandbox]]''
| ||
| Template:Param value |
|
{{Langx|ru|тундра|italic=yes}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
|
{{Langx|ru-latn|tûndra|italic=yes}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
| Template:Param value |
|
{{Langx|ru|тундра|italic=unset}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
|
''{{Langx/sandbox|ru|тундра|italic=unset}}''
|
Template:Langx/sandbox | ''[[:Template:Langx/sandbox]]''
| ||
{{Langx|ru-latn|tûndra|italic=unset}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
''{{Langx/sandbox|ru-latn|tûndra|italic=unset}}''
|
Template:Langx/sandbox | ''[[:Template:Langx/sandbox]]''
| ||
| Template:Param value |
|
{{Langx|ru|тундра|italic=invert}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
|
{{Langx|ru|''тундра''|italic=invert}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
{{Langx|ru-latn|tûndra|italic=invert}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
| ||
{{Langx|ru-latn|''tûndra''|italic=invert}}
|
Template:Langx/sandbox | [[:Template:Langx/sandbox]]
|
備註
[編輯原始碼]- ↑ compare
|italic=invertto|italic=unset:{{Langx|de|... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.|italic=invert}}{{Langx|de|''... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.''|italic=unset}}
模板數據
[編輯原始碼]為讀者標註術語或短語的外語原文。
| 參數 | 描述 | 類型 | 狀態 | |
|---|---|---|---|---|
| 語言標籤 | 1 | 一個有效的IETF語言標籤,用於標識非現代標準漢語的文字語言。 | 字串 | 必填 |
| 文本 | 2 | 顯示的文本。 | 字串 | 必填 |
| 音譯 | 3 translit | 外語文本的音譯,適用於不使用拉丁字母的語言。對於使用拉丁字母的語言,此字段被忽略。 | 字串 | 非必填 |
| 直譯 | 4 lit translation | 外語文本的直譯。 | 字串 | 非必填 |
| 顯示連結 | links link | 設為'no'則禁用指向語言條目的連結。 | 布林值 | 非必填 |
| 語言標籤 | label | 設為'none'則隱藏語言連結和標籤。某些語言可能有其他選項值可用。
| 行 | 非必填 |
| 從右到左 | rtl | 切換外語文字是否從右到左顯示。
| 布林值 | 非必填 |
| 斜體 | italic italics i | 切換外語文字是否斜體顯示。
| 布林值 | 非必填 |
| 字體大小 | size | 設置外語文字的字體大小。
| 不明 | 非必填 |
範例
[編輯原始碼]The following examples show translations from German.
寫法
- Weimar is located in the federal state of Thuringia (
{{Langx|de|Thüringen}}). - The Seafarers of Catan (
{{Langx|de|Die Seefahrer von Catan}}) is an expansion of the board game The Settlers of Catan. - Albert the Bear (
{{Langx|de|Albrecht der Bär|links=no}}) - All Quiet on the Western Front (
{{Langx|de|Im Westen nichts Neues|lit=In the West Nothing New}}) is a novel by Erich Maria Remarque.
呈現
- Weimar is located in the federal state of Thuringia (Template:Langx/sandbox).
- The Seafarers of Catan (Template:Langx/sandbox) is an expansion of the board game The Settlers of Catan.
- Albert the Bear (Template:Langx/sandbox)
- All Quiet on the Western Front (Template:Langx/sandbox) is a novel by Erich Maria Remarque.
追蹤分類
[編輯原始碼]- Category:Lang和lang-xx模板錯誤(7)
- Category:Lang和lang-xx代碼升級為ISO 639-1(0)
- Category:Lang和lang-xx使用棄用的ISO 639代碼(0)
參見
[編輯原始碼]腳本錯誤:沒有「Lang/documentor tool」這個模組。
- {{Lang}}
- {{Language with name/for}}
- ISO 639-1代碼列表
- {{IPA}}
| 上述文件嵌入自Template:Langx/doc。 (編輯 | 歷史) 編者可以在本模板的沙盒 (建立 | 鏡像)和測試樣例 (建立)頁面進行實驗。 請在/doc子頁面中添加分類。本模板的子頁面。 |