Template:Altnames: Difference between revisions
Jump to navigation
Jump to search
(Add game parameter) |
1416006136 (talk | contribs) (multiple language support) |
||
Line 1: | Line 1: | ||
<onlyinclude><includeonly>{{inline note|[[File:AltNames.png|link=|alt=]] <!-- | <onlyinclude><includeonly>{{inline note|[[File:AltNames.png|link=|alt=]] <!-- | ||
-->{{#if: {{{game|}}}|In {{{game}}}, this entity is also tied to |This entity is also tied to }}<!-- | -->{{#switch:{{{suf|}}} | ||
|#default={{#if: {{{game|}}}|In {{{game}}}, this entity is also tied to |This entity is also tied to }} | |||
|:zh-cn={{#if: {{{game|}}}|在 {{{game}}} 中,此实体也绑定到 |此实体也绑定到 }} | |||
}}<!-- | |||
-->{{#if: {{{name1|}}} | <code>{{{name1}}}</code> }}<!-- | -->{{#if: {{{name1|}}} | <code>{{{name1}}}</code> }}<!-- | ||
-->{{#if: {{{name2|}}} | , <code>{{{name2}}}</code> }}<!-- | -->{{#if: {{{name2|}}} | , <code>{{{name2}}}</code> }}<!-- | ||
Line 10: | Line 12: | ||
-->{{#if: {{{name7|}}} | , <code>{{{name7}}}</code> }}<!-- | -->{{#if: {{{name7|}}} | , <code>{{{name7}}}</code> }}<!-- | ||
-->{{#if: {{{name8|}}} | , <code>{{{name8}}}</code> }}<!-- | -->{{#if: {{{name8|}}} | , <code>{{{name8}}}</code> }}<!-- | ||
-->. {{{misc|}}} }}</includeonly></onlyinclude> | -->{{#switch:{{{suf|}}}|#default=.|:zh-cn=。}} {{{misc|}}} }}</includeonly></onlyinclude> | ||
{{ | {{doc|content= | ||
{{inline note templates}} | {{inline note templates}} | ||
This template is intended to be used when an entity is tied to multiple classnames, especially those that do not appear to serve any purpose other than deprecation. | This template is intended to be used when an entity is tied to multiple classnames, especially those that do not appear to serve any purpose other than deprecation. | ||
Line 19: | Line 21: | ||
=== Parameters === | === Parameters === | ||
* {{param|name1}} ''to'' {{param|name8}} - The alternate classnames. | * {{param|name1}} ''to'' {{param|name8}} - The alternate classnames. | ||
* {{param|misc}} - Use to display additional text in the same note. | * {{param|misc}} - ''Optional:'' Use to display additional text in the same note. | ||
* {{param|suf}} - ''Optional:'' This is a suffix that will be added to all elements of the template to display the content in the desired language (if it is translated into it). {{ModernNote|There should be a colon before the language code, for example ":es".}} | |||
=== Example === | === Example === | ||
<code><nowiki>{{altnames|name1=x|name2=y|name3=z}}</nowiki></code> would return as: | <code><nowiki>{{altnames|name1=x|name2=y|name3=z}}</nowiki></code> would return as: | ||
Line 25: | Line 28: | ||
<code><nowiki>{{altnames|name1=x|game={{game link|portal}}}}</nowiki></code> would return as: | <code><nowiki>{{altnames|name1=x|game={{game link|portal}}}}</nowiki></code> would return as: | ||
{{altnames|name1=x|game={{game link|Portal}}}} | {{altnames|name1=x|game={{game link|Portal}}}}<!-- | ||
-->{{clr}} | |||
|content/zh-cn= | |||
{{inline note templates|suf=:zh-cn|title=注释模板}} | |||
此模板旨在当实体绑定到多个 Classname 时使用,尤其是那些除了弃用之外似乎没有任何用途的类名。 | |||
== 用法 == | |||
=== 参数 === | |||
* {{param|name1}} ''到'' {{param|name8}} - 备用 Classname。 | |||
* {{param|misc}} - ''可选:''用于在同一注意中显示其他文本。 | |||
* {{param|suf}} - ''可选:''这是一个后缀,将添加到模板的所有元素中,以所需的语言显示内容(如果已翻译成该语言)。{{ModernNote|suf=:zh-cn|语言代码前应该有一个冒号,例如“:es”。}} | |||
=== 示例 === | |||
<code><nowiki>{{altnames|suf=:zh-cn|name1=x|name2=y|name3=z}}</nowiki></code> 会返回: | |||
{{altnames|suf=:zh-cn|name1=x|name2=y|name3=z}} | |||
<code><nowiki>{{altnames|suf=:zh-cn|name1=x|game={{game link|portal}}}}</nowiki></code> 会返回: | |||
{{altnames|suf=:zh-cn|name1=x|game={{game link|Portal}}}} | |||
{{clr}} | |||
}} | }} | ||
[[Category:Inline note templates]] | [[Category:Inline note templates]] | ||
[[Category:Notice templates]] | [[Category:Notice templates]] |
Revision as of 01:31, 2 January 2023
The above documentation is transcluded from Template:Altnames/doc. (Edit | Page history)
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.
Editors can experiment in this template's sandbox (edit) and testcases (create) pages.