模板:Langx
外观

![]() | 本模板不应在引文模板(如引文格式1和引文格式2)中使用,因为本模板所含的标记会破坏引文模板生成的 COinS 元数据,更多信息请见“Wikipedia:COinS”。 |
![]() | 本模板不能替换引用嵌入。 |
![]() | 此模板使用Lua语言: |
语言模板 |
---|
语言名称(ISO 639) |
|
维基词典链接 |
外语文本 |
|
其他 |
|
资料 |
用法
[编辑]语言模板用来标注特定内容的语言。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= |
— | |code=
|
|text= |
The non-English text | — | |2=
|
|translit= |
The Latin script transliteration of the content in |text= |
— | |3=
|
|translit-std= |
The standard used for the transliteration of the value of |translit= ; accepted values are: ISO , DIN , IAST , ALA , ALA-LC |
— | |
|translit-script= |
The transliteration standard's script identifier | — | |
|translation= |
The literal English translation or gloss of the content in |text= |
— | |lit= , |4=
|
|label= |
The label to be used instead of template-provided language label. May be wikilinked. Special keyword none causes the template to render without any labels (including transliteration and translation labels) |
— | |
|link= |
Links language name and static text associated with |translit= and |translation= . Defaults to yes . Accepted values are: no , yes ; |link=no does not unlink wikilinked labels set by |label= |
— | |links=
|
|proto= |
Accepted values are: no (default) or yes (default for private-use language tags with the -x-proto subtags); when yes (default or explicit), prefixes rendered text with an asterisk indicating 'unattested' |
— | |
|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 Latn (not "Latin"!) forces italic rendering unless overridden by |italic= ; overrides |rtl= |
|italic= |
|
|region= |
(Deprecated – include region subtag in |1= ) IETF language region subtag |
— | |
|variant= |
(Deprecated – include variant subtag in |1= ) IETF language variant subtag |
— | |
|rtl= |
yes indicates that the writing system used for the content in |text= is right-to-left; accepted values are: no (default), yes |
|script= |
|
|italic= |
yes , no , unset , invert , default |
; accepted values are: — | |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 % or em units, not a fixed px value. |
— | |
|engvar= |
Selects English variant spelling of 'romanised' or 'romanized' (default) according to the country specified; accepted values are: au (Australia), ca (Canada), gb (Great Britain), ie (Ireland), in (India), nz (New Zealand), us (United States), za (South Africa) |
— | |
|cat= |
Inhibits automatic categorization; mirror version of |nocat= ; accepted values are: no , n , false , f , off , 0 |
— | |
|nocat= |
Inhibits automatic categorization; mirror version of |cat= ; accepted values are: yes , y , true , t , on , 1 |
— |
|italic= 值 |
描述 | 示例代码 | 结果 | HTML标记 |
---|---|---|---|---|
|
|
{{Langx|ru|тундра}}
|
俄语:тундра | [[俄语]]:<span lang="ru">тундра</span>
|
{{Langx|ru|tûndra}}
|
俄语:tûndra | [[俄语]]:<i lang="ru">tûndra</i> 标记有误;需要script子标签 -latn 。
| ||
{{Langx|fr|toundra}}
|
法语:toundra | [[法语]]:<i lang="fr">toundra</i>
| ||
{{Langx|ru-latn|tûndra}}
|
俄语:tûndra | [[俄语]]:<i lang="ru-Latn">tûndra</i>
| ||
default
|
{{Langx|ru|тундра|italic=default}}
|
俄语:тундра | [[俄语]]:<span lang="ru">тундра</span>
| |
{{Langx|fr|toundra|italic=default}}
|
法语:toundra | [[法语]]:<i lang="fr">toundra</i>
| ||
{{Langx|ru-latn|tûndra|italic=default}}
|
俄语:tûndra | [[俄语]]:<i lang="ru-Latn">tûndra</i>
| ||
no
|
|
{{Langx|ru|тундра|italic=no}}
|
俄语:тундра | [[俄语]]:<span lang="ru" style="font-style: normal;">тундра</span>
|
{{Langx|fr|toundra|italic=no}}
|
法语:toundra | [[法语]]:<span lang="fr" style="font-style: normal;">toundra</span>
| ||
{{Langx|ru-latn|tûndra|italic=no}}
|
俄语:tûndra | [[俄语]]:<span lang="ru-Latn" style="font-style: normal;">tûndra</span>
| ||
''{{Langx/sandbox|ru-latn|tûndra|italic=no}}''
|
俄语:tûndra | ''[[俄语]]:<span lang="ru-Latn" style="font-style: normal;">tûndra</span>''
| ||
yes
|
|
{{Langx|ru|тундра|italic=yes}}
|
俄语:тундра | [[俄语]]:<i lang="ru">тундра</i>
|
{{Langx|ru-latn|tûndra|italic=yes}}
|
俄语:tûndra | [[俄语]]:<i lang="ru-Latn">tûndra</i>
| ||
unset
|
|
{{Langx|ru|тундра|italic=unset}}
|
俄语:тундра | [[俄语]]:<span lang="ru">тундра</span>
|
''{{Langx/sandbox|ru|тундра|italic=unset}}''
|
俄语:тундра | ''[[俄语]]:<span lang="ru">тундра</span>''
| ||
{{Langx|ru-latn|tûndra|italic=unset}}
|
俄语:tûndra | [[俄语]]:<span lang="ru-Latn">tûndra</span>
| ||
''{{Langx/sandbox|ru-latn|tûndra|italic=unset}}''
|
俄语:tûndra | ''[[俄语]]:<span lang="ru-Latn">tûndra</span>''
| ||
invert
|
|
{{Langx|ru|тундра|italic=invert}}
|
俄语:тундра | [[俄语]]:<span lang="ru">''тундра''</span>
|
{{Langx|ru|''тундра''|italic=invert}}
|
俄语:тундра | [[俄语]]:<span lang="ru">тундра</span>
| ||
{{Langx|ru-latn|tûndra|italic=invert}}
|
俄语:tûndra | [[俄语]]:<span lang="ru-Latn">''tûndra''</span>
| ||
{{Langx|ru-latn|''tûndra''|italic=invert}}
|
俄语:tûndra | [[俄语]]:<span lang="ru-Latn">tûndra</span>
|
备注
[编辑]- ^ compare
|italic=invert
to|italic=unset
:{{Langx|de|... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.|italic=invert}}
- 德语:... ein neues Opernprojekt in Angriff: Das Käthchen von Heilbronn, nach Heinrich von Kleists gleichnamigem Drama.
{{Langx|de|''... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.''|italic=unset}}
- 德语:... ein neues Opernprojekt in Angriff: Das Käthchen von Heilbronn, nach Heinrich von Kleists gleichnamigem Drama.
模板数据
[编辑]为读者标注术语或短语的外语原文。
参数 | 描述 | 类型 | 状态 | |
---|---|---|---|---|
语言标签 | 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 (德语:Thüringen).
- The Seafarers of Catan (德语:Die Seefahrer von Catan) is an expansion of the board game The Settlers of Catan.
- Albert the Bear (德语:Albrecht der Bär)
- All Quiet on the Western Front (德语:Im Westen nichts Neues, 直译 'In the West Nothing New') is a novel by Erich Maria Remarque.
追踪分类
[编辑]- Category:Lang和lang-xx模板错误(1)
- Category:Lang和lang-xx代码升级为ISO 639-1(10)
- Category:Lang和lang-xx使用弃用的ISO 639代码(7)
参见
[编辑]- {{Lang}}
- {{Language with name/for}}
- ISO 639-1代码列表
- {{IPA}}