< 模板:Lang-x/doc
Xiayu讨论 | 贡献2020年7月3日 (五) 20:05的版本 (导入1个版本)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

模板:Lang-x/doc/parameters

来自中文乐谱库

lang-xx

<section begin=lang_xx_parameters />

lang-xx支持的参数
参数 定义 受制于 别名
text 非中文文本 {{{1}}}
translit text内容的拉丁文字转译 {{{2}}}
translit-std translit文字的转译标准。可接受的值有:ISO, DIN, IAST, ALA, ALA-LC
translit-script 转译标准的文字标识
translation text的中文字面意思 lit, {{{3}}}
label 使用的标记,代替模板提供的语言标记。可加维基连接。特殊关键字none会使模板以无标记呈现(包括转译和直译字段)
link yes(默认) 链接语言名称和与translittranslation关联的静态文本。可接受的值有:no, yes|link=no 不影响|label=设置的维基连接 links
code text内容的IETF语言标签。由模板设置,不鼓励重写模板设置
script IETF语言文字子标签。当text中的内容使用不止一种书写系统时,此字段由模板设置。总是四个字母。Latn (不是"Latin"!)值强制斜体渲染,除非由italic字段重写。重写rtl italic
region IETF语言区域子标签
variant IETF语言变体子标签
rtl yes表示text内容使用从右至左的书写系统。可接受的值有:no(默认), yes script
italic 参考表格"lang-xx |italic= 参数操作"; 可接受的值有:yes, no, unset, invert, default italics
size 指定text内容的字体大小。使用适合与CSS font-size属性一起使用的值。应该是%em提供的相对值,不是固定的px值。
nocat yes禁止自动分类。可接受的值有:no(默认), yes
lang-xx |italic= 参数操作
|italic= value 描述 示例代码 结果 HTML标记
  • 参数不存在;
  • 参数存在,未设置;
  • 无效值
  • 模块应用样式:
  •   模板设置, 或
  •   |script=latn
  • 否则继承自外部标记
  • 无效值视为默认值
{{lang-ru|тундра}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-1">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-ru|tûndra}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-3">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
Incorrect markup; this requires |script=latn.
{{lang-fr|toundra}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-5">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-ru|script=latn|tûndra}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-7">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
default {{lang-ru|тундра|italic=default}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-9">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-fr|toundra|italic=default}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-11">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-ru|script=latn|tûndra|italic=default}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-13">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
no
  • 模块采用直立样式;
  • 重写|script=latn
  • 重写外部标记
{{lang-ru|тундра|italic=no}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-15">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-fr|toundra|italic=no}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-17">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-ru|script=latn|tûndra|italic=no}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-19">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
''{{lang-ru|script=latn|tûndra|italic=no}}'' Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted ''<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-21">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>''
yes
  • 模块采用斜体样式;
  • 忽略|script=latn
{{lang-ru|тундра|italic=yes}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-23">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
{{lang-ru|script=latn|tûndra|italic=yes}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-25">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
unset
  • 模块不使用样式;
  • 从外部标记继承样式;
  • 重写|script=latn
{{lang-ru|тундра|italic=unset}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-27">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
''{{lang-ru|тундра|italic=unset}}'' Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted ''<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-29">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>''
{{lang-ru|script=latn|tûndra|italic=unset}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-31">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
''{{lang-ru|script=latn|tûndra|italic=unset}}'' Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted ''<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-33">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>''
invert
  • 模块不使用样式;
  • 反转内部标记的样式
  • 禁用自动斜体
  • 重写文本子标签latn
{{lang-ru|тундра|italic=invert}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-35">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
''{{lang-ru|тундра|italic=invert}}'' Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted ''<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-37">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>''
{{lang-ru|script=latn|tûndra|italic=invert}} Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted <strong class="error"><span class="scribunto-error" id="mw-scribunto-error-39">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>
''{{lang-ru|script=latn|tûndra|italic=invert}}'' Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted ''<strong class="error"><span class="scribunto-error" id="mw-scribunto-error-41">Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted</span></strong>''

对比|italic=invert|italic=unset

{{Lang-de|... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.|italic=invert}}
Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted
{{Lang-de|''... ein neues Opernprojekt in Angriff: ''Das Käthchen von Heilbronn'', nach Heinrich von Kleists gleichnamigem Drama.''|italic=unset}}
Lua错误:无法创建进程:proc_open(/dev/null): failed to open stream: Operation not permitted

<section end=lang_xx_parameters />

lang

<section begin=lang_parameters />

lang支持的参数
参数 定义 受制于 别名
code text内容的IETF语言标签 {{{1}}}
text 非中文文本 {{{2}}}
rtl yes 表示text内容使用从右至左的书写系统。可接受的值有:no(默认), yes code的IETF的文本子标签(如果有的话)
italic 参考表格"lang |italic= parameter operation";可接受的值有:yes, no, unset, invert, default italics
size 指定text内容的字体大小。使用适合与CSS font-size 属性一起使用的值。应该是%em提供的相对值,不是固定的px值。
nocat yes 禁止自动分类。可接受的值有:no(默认), yes
lang |italic= 参数操作
|italic= value 描述 示例代码 结果 HTML标记
  • 参数不存在;
  • 参数存在,未设置;
  • 无效值
  • 模块应用样式来自:
  •   自动斜体或
  •   文字子标签latn
  • 否则继承外部标记;
  • 无效值视为默认值
{{lang|ru|тундра}} -{тундра}- <span lang="ru" xml:lang="ru">-{тундра}-</span>
模板:Deprecated code -{tûndra}- <span lang="ru" xml:lang="ru">-{tûndra}-</span>
Incorrect markup; this requires |ru-latn.
{{lang|fr|toundra}} -{toundra}- <span lang="fr" xml:lang="fr">-{toundra}-</span>
{{lang|ru-latn|tûndra}} -{tûndra}- <span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>
default {{lang|ru|тундра|italic=default}} -{тундра}- <span lang="ru" xml:lang="ru">-{тундра}-</span>
{{lang|fr|toundra|italic=default}} -{toundra}- <span lang="fr" xml:lang="fr">-{toundra}-</span>
{{lang|ru-latn|tûndra|italic=default}} -{tûndra}- <span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>
no
  • 模块采用直立风格;
  • 重写自动斜体;
  • 重写文字子标签latn
  • 重写外部标记
{{lang|ru|тундра|italic=no}} -{тундра}- <span lang="ru" xml:lang="ru">-{тундра}-</span>
{{lang|fr|toundra|italic=no}} -{toundra}- <span lang="fr" xml:lang="fr">-{toundra}-</span>
{{lang|ru-latn|tûndra|italic=no}} -{tûndra}- <span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>
''{{lang|fr|toundra|italic=no}}'' -{toundra}- ''<span lang="fr" xml:lang="fr">-{toundra}-</span>''
yes
  • 模块采用斜体样式;
  • 忽略自动斜体;
  • 忽略文字子标签latn
{{lang|ru|тундра|italic=yes}} -{тундра}- <span lang="ru" xml:lang="ru">-{тундра}-</span>
{{lang|ru-latn|tûndra|italic=yes}} -{tûndra}- <span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>
unset
  • 模块不使用样式;
  • 从外部标记继承样式;
  • 禁用自动斜体
  • 忽略文字子标签latn
{{lang|ru|тундра|italic=unset}} -{тундра}- <span lang="ru" xml:lang="ru">-{тундра}-</span>
''{{lang|ru|тундра|italic=unset}}'' -{тундра}- ''<span lang="ru" xml:lang="ru">-{тундра}-</span>''
{{lang|ru-latn|tûndra|italic=unset}} -{tûndra}- <span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>
''{{lang|ru-latn|tûndra|italic=unset}}'' -{tûndra}- ''<span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>''
invert
  • 模块不使用样式;
  • 反转内部标记的样式
  • 禁用自动斜体
  • 忽略文字子标签latn
{{lang|ru|тундра|italic=invert}} -{тундра}- <span lang="ru" xml:lang="ru">-{тундра}-</span>
''{{lang|ru|тундра|italic=invert}}'' -{тундра}- ''<span lang="ru" xml:lang="ru">-{тундра}-</span>''
{{lang|ru-latn|tûndra|italic=invert}} -{tûndra}- <span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>
''{{lang|ru-latn|tûndra|italic=invert}}'' -{tûndra}- ''<span lang="ru-latn" xml:lang="ru-latn">-{tûndra}-</span>''

对比|italic=invert|italic=unset

{{Lang|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.}-
{{Lang|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.}-

<section end=lang_parameters />