Template:Language/archives/Suflang: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(Undo revision 277597 by REDESAILE (talk))
Tag: Undo
Line 1: Line 1:
<includeonly><onlyinclude>{{#switch:{{{suf|}}}
<!--
 
    + Documentation +
 
-->{{uselang|en=1}}
{{ {{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.
== Usage ==
{{MdCodeBlock|<nowiki>{{suflang|suf={{{suf|}}}|...|:...=...|...}}</nowiki>}}
=== Parameters ===
All the parameters are '''optional'''.
* {{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|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>}}
=== Examples ===
{{Code|<nowiki>{{suflang|text}}</nowiki>}} → {{suflang|text}}
 
{{Code|<nowiki>{{suflang|text|:zh-cn=文本|suf=:zh-cn}}</nowiki>}} → {{suflang|text|:zh-cn=文本|suf=:zh-cn}}
}}
}}}}[[Category:Translation templates]][[Category:Templates]][[Category:Multiple languages]]
<!--
 
    + Template +
 
--><includeonly><onlyinclude>{{#switch:{{{suf|}}}
|#default={{{1|}}}
|#default={{{1|}}}
|:en={{{:en|{{{1|}}}}}}
|:en={{{:en|{{{1|}}}}}}
Line 25: Line 49:
|:ka={{{:ka|{{{1|}}}}}}
|:ka={{{:ka|{{{1|}}}}}}
|:he={{{:he|{{{1|}}}}}}
|:he={{{:he|{{{1|}}}}}}
}}</onlyinclude></includeonly>{{doc}}
}}</onlyinclude></includeonly>

Revision as of 09:27, 27 January 2023

Template:Uselang {{

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 = 中文(台灣)
‎}}

}}