Template:Tr/doc

From Terraria Mods Wiki
Jump to navigation Jump to search

This template translates a given game term from English into another language, based on the translation databases. This template is an important part of localization mod wikis to other languages.

Usage

{{ tr | <term to translate> | lang = <target language> (optional) | mod = <mod name> (optional) | vanilla = y/yes (optional) }}

First unnamed parameter

The term that is to be translated. It needs to be registered in the translation database for the target language and/or mod, otherwise the template will simply display the term, untranslated. The input is case-sensitive (see examples below) in order to improve the performance of the template.

lang

The ISO 639-1 (or ISO 639-3) code of the language to translate the term into. Defaults to {{lang}}, so it can almost always be omitted.

mod

Name of the mod which database you want to use. It sets to {{modname|get}} by default so it can be omitted.

vanilla

Boolean value. If set it uses only vanilla database.

Examples

Code Result
{{modname|set|Coralite}}
{{tr|Zenith}} Zenith
{{tr|Zenith|lang=ru}} «Зенит»
{{tr|zenith|lang=ru}} zenith
{{lang/set|de}}
{{tr|Terra Blade}} Terraklinge
{{tr|Gigantes Shoes}} Gigantes Shoes
{{tr|Gigantes Shoes|lang=zh}} 癸干忒斯之靴

Translation databases

List of translation databases for the original game:

Flag cn.svg Chinese: Module:Tr/vanilla-zh (edit)
Flag fr.svg French: Module:Tr/vanilla-fr (edit)
Flag de.svg German: Module:Tr/vanilla-de (edit)
Flag kr.svg Korean: Module:Tr/vanilla-ko (edit)
Flag pl.svg Polish: Module:Tr/vanilla-pl (edit)
Flag pt.svg Portuguese: Module:Tr/vanilla-pt (edit)
Flag ru.svg Russian: Module:Tr/vanilla-ru (edit)
Flag es.svg Spanish: Module:Tr/vanilla-es (edit)
Flag ua.svg Ukrainian: Module:Tr/vanilla-uk (edit)

List of translation databases for mods:

Logo (Clicker Class).png Clicker Class: Module:Tr/db-Clicker Class (edit)
Logo (Coralite).png Coralite: Module:Tr/db-Coralite (edit)
Logo (Touhou Little Friend Wiki).png Touhou Little Friend Wiki: Module:Tr/db-Touhou Little Friend Wiki (edit)