Template:If lang: Difference between revisions
From Valheim Wiki
Created page with "{{#switch:{{SUBPAGENAME}} | ar|cs|da|de|es|fi|fr|hu|it|ja|ko|nl|no|pl|pt|pt-br|ro|ru|sv|tr|zh-hans|zh-hant = {{{2|{{{non-en|{{{lang|/{{SUBPAGENAME}}}}}}}}}}} | #default = {{{1..." |
No edit summary |
||
| Line 2: | Line 2: | ||
| ar|cs|da|de|es|fi|fr|hu|it|ja|ko|nl|no|pl|pt|pt-br|ro|ru|sv|tr|zh-hans|zh-hant = {{{2|{{{non-en|{{{lang|/{{SUBPAGENAME}}}}}}}}}}} | | ar|cs|da|de|es|fi|fr|hu|it|ja|ko|nl|no|pl|pt|pt-br|ro|ru|sv|tr|zh-hans|zh-hant = {{{2|{{{non-en|{{{lang|/{{SUBPAGENAME}}}}}}}}}}} | ||
| #default = {{{1|{{{en|}}}}}} | | #default = {{{1|{{{en|}}}}}} | ||
}}<noinclude> | }}<noinclude> | ||
{{tl|if lang}} is a template that can output specified values based on whether a particular page is a language subpage or not. | {{tl|if lang}} is a template that can output specified values based on whether a particular page is a language subpage or not. | ||
Latest revision as of 18:32, 2 January 2022
{{if lang}} is a template that can output specified values based on whether a particular page is a language subpage or not.
Usage
| Code | English page result | Language page result (de) |
|---|---|---|
[[Soldier{{if lang}}]]
|
Soldier | Soldier/de |
[[Soldier {{if lang}}]]
|
Soldier | Soldier_/de |
Advanced
{{if lang}} can be used in more advanced ways by specifying the English and non-English outputs.
{{if lang | non-en = _{{SUBPAGENAME}} }}will generate_dewhen used on Equalizer/de.- This example is used in infobox templates to display item name images in the correct language.
Languages supported
{{if lang}} recognises only the below language subpages (the same as {{lang}}):
| Available languages | ar, cs, da, de, es, fi, fr, hu, it, ja, ko, nl, no, pl, pt, pt-br, ro, ru, sv, tr, zh-hans, zh-hant |
|---|