Difference between revisions of "Template:Translate"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(added chinese dictionaries)
old>Realpsojed
(removed useless ifeq check, it always returned subpagename)
Line 1: Line 1:
<includeonly>{{#switch: {{#ifeq: {{SUBPAGENAME}} | Tooltip | {{#titleparts: {{PAGENAME}} | 1 | 2 }} | {{SUBPAGENAME}}}}
<includeonly>{{#switch: {{SUBPAGENAME}}
|cz = {{#switch: {{{2}}}
|cz = {{#switch: {{{2}}}
|Properties = {{CZ Properties|{{{1}}}}}
|Properties = {{CZ Properties|{{{1}}}}}
Line 35: Line 35:
|ValuableDescriptions = {{ZH ValuableDescriptions|{{{1}}}}}
|ValuableDescriptions = {{ZH ValuableDescriptions|{{{1}}}}}
|Treatises = {{ZH Treatises|{{{1}}}}}
|Treatises = {{ZH Treatises|{{{1}}}}}
|#default = Нет перевода}}
|#default = Missing Translation}}
|#default = {{{1}}}}}</includeonly><noinclude>{{Doc}}[[Category:Language templates]]</noinclude>
|#default = {{{1}}}}}</includeonly><noinclude>{{Doc}}[[Category:Language templates]]</noinclude>

Revision as of 19:34, 1 May 2021

Template-info.png Documentation

This template checks if SUBPAGENAME is one of the languages. If match is found, the first parameter (some text) will be translated to the language of that subpage. The second parameter (for example ItemDescriptions) tells the template which dictionary to use.

See Category:Language_templates for a list of dictionaries for your language.

Used on Template:Properties and Template:Weapon.