Difference between revisions of "Template:Translate"

From Stoneshard wiki
Jump to navigation Jump to search
old>Realpsojed
(added second parameter and several templates with translations)
old>Realpsojed
(dictionaries: add ConditionNames and ConditionDescriptions, remove Texts)
Line 1: Line 1:
<includeonly>{{#switch: {{#ifeq: {{SUBPAGENAME}} | Tooltip | {{#titleparts: {{PAGENAME}} | 1 | 2 }} | {{SUBPAGENAME}}}}
<includeonly>{{#switch: {{#ifeq: {{SUBPAGENAME}} | Tooltip | {{#titleparts: {{PAGENAME}} | 1 | 2 }} | {{SUBPAGENAME}}}}
|cz = {{#switch: {{{2}}}
|cz = {{#switch: {{{2}}}
|Texts = {{CZ Texts|{{{1}}}}}
|Properties = {{CZ Properties|{{{1}}}}}
|Properties = {{CZ Properties|{{{1}}}}}
|ItemNames = {{CZ ItemNames|{{{1}}}}}
|ItemNames = {{CZ ItemNames|{{{1}}}}}
|ItemDescriptions = {{CZ ItemDescriptions|{{{1}}}}}
|ItemDescriptions = {{CZ ItemDescriptions|{{{1}}}}}
|ConditionNames = {{CZ ConditionNames|{{{1}}}}}
|ConditionDescriptions = {{CZ ConditionDescriptions|{{{1}}}}}
|#default = Chybí překlad}}
|#default = Chybí překlad}}
|ru = {{#switch: {{{2}}}
|ru = {{#switch: {{{2}}}
|Texts = {{RU Texts|{{{1}}}}}
|Properties = {{RU Properties|{{{1}}}}}
|Properties = {{RU Properties|{{{1}}}}}
|ItemNames = {{RU ItemNames|{{{1}}}}}
|ItemNames = {{RU ItemNames|{{{1}}}}}
|ItemDescriptions = {{RU ItemDescriptions|{{{1}}}}}
|ItemDescriptions = {{RU ItemDescriptions|{{{1}}}}}
|ConditionNames = {{RU ConditionNames|{{{1}}}}}
|ConditionDescriptions = {{RU ConditionDescriptions|{{{1}}}}}
|#default = Нет перевода}}
|#default = Нет перевода}}
|#default = {{{1}}}}}</includeonly><noinclude>{{Doc}}[[Category:Language templates]]</noinclude>
|#default = {{{1}}}}}</includeonly><noinclude>{{Doc}}[[Category:Language templates]]</noinclude>

Revision as of 15:08, 8 October 2020

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.