Template:Language/archives/Suflang: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
m (clean up, replaced: See Also → See also, {{ModernNote| → {{note|, {{Uselangflags → {{ulf)
Line 3: Line 3:
     + Documentation +
     + Documentation +


-->{{Uselangflags|en=1}}{{Tdeprecated|uselang}}
-->{{ulf|en=1}}{{Tdeprecated|uselang}}
{{ {{autolang|documentation}} |content={{autolang|{{distinguish|Template:Autolang}}
{{ {{autolang|documentation}} |content={{autolang|{{distinguish|Template:Autolang}}
This template is used to switch the content according to the {{param|suf}} parameter. It can be also instead of {{Code|<nowiki>{{#switch:{{{suf|}}}|#default=...|:...=...|...}}</nowiki>}}. It should use in other templates so it can play its part.
This template is used to switch the content according to the {{param|suf}} parameter. It can be also instead of {{Code|<nowiki>{{#switch:{{{suf|}}}|#default=...|:...=...|...}}</nowiki>}}. It should use in other templates so it can play its part.
Line 12: Line 12:
* {{param|1|tag=kbd}}: The default value the template should show. It should be in English.
* {{param|1|tag=kbd}}: The default value the template should show. It should be in English.
* {{param|:<lang suffix>|tag=kbd}}: The content of this language the template should show. See examples to understand better.
* {{param|:<lang suffix>|tag=kbd}}: The content of this language the template should show. See examples to understand better.
* {{param|suf|tag=kbd}}: The suffix of the language. {{ModernNote|'''If you use the template in other templates, please specify it into {{param|tag=kbd|<nowiki>suf|</nowiki>}} and it will work.''' Example: {{Code|<nowiki>{{suflang|suf={{{suf|}}}|...|:...=...|...}}</nowiki>}}
* {{param|suf|tag=kbd}}: The suffix of the language. {{note|'''If you use the template in other templates, please specify it into {{param|tag=kbd|<nowiki>suf|</nowiki>}} and it will work.''' Example: {{Code|<nowiki>{{suflang|suf={{{suf|}}}|...|:...=...|...}}</nowiki>}}
=== Examples ===
=== Examples ===
{{Code|<nowiki>{{suflang|text}}</nowiki>}} → {{suflang|text}}
{{Code|<nowiki>{{suflang|text}}</nowiki>}} → {{suflang|text}}


{{Code|<nowiki>{{suflang|text|:zh-cn=文本|suf=:zh-cn}}</nowiki>}} → {{suflang|text|:zh-cn=文本|suf=:zh-cn}}
{{Code|<nowiki>{{suflang|text|:zh-cn=文本|suf=:zh-cn}}</nowiki>}} → {{suflang|text|:zh-cn=文本|suf=:zh-cn}}
== See Also ==
== See also ==
*{{tl|link=autolang}}
*{{tl|link=autolang}}
*{{tl|link=Uselangflags}}
*{{tl|link=Uselangflags}}

Revision as of 11:53, 6 January 2024

English (en)
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
Please use {{uselang}} instead.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

{{

Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}
|content=
Red x.png
This template (and its redirect) is Wikipedia icon Deprecated. Its use is not recommended and its functionality may be compromised.
You can help our editors by replacing or deleting this template on the Pages that use this template. Once no more pages use this template, it should be Marked for deletion.

Additional notes:
Use #switch parser function instead. Example
{{#switch: {{language}}
| #default = English
| ja = 日本語
| zh-tw = 中文(台灣)
‎}}

}}