From Terraria Wiki
Jump to navigation Jump to search
This template uses Lua.
This template uses Module:Tr, a script written in the Lua programming language. To learn more about Lua, see Terraria Wiki:Lua.
Template-info.svg Documentation The documentation below is transcluded from Template:Tr/doc. (edit | history)

This template translates a given game term from English into another language, based on the translation databases. It is one of the most powerful and crucial templates for the translation projects.


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

First unnamed parameter

The term that is to be translated. It needs to be registered in the translation database for the target language, 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.


Display the link to the page of the term in the target language, instead of the translated term itself. While this will usually have no effect on off-wiki language wikis (de, fr, hu, ko, ru, pl, pt, uk, zh, es-formal) since these have page names in their languages, its effect is important for the other language wikis, whose page names are in English (e.g. Dirt Block/it).


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.


The $lang parameter is used here for demonstrative purposes. In the vast majority of cases, it can be omitted as the correct target language will be automatically detected via {{lang}}.

Code Result
{{tr|lang=it|Dirt Block}} Blocco di terra
{{tr|lang=it|Dirt Wings}} Dirt Wings
{{tr|lang=it|Dirt Block|link=y}} Dirt Block/it

The input is case-sensitive. Spaces around the input do not matter, but within the input they do matter.

Code Result
{{tr|lang=it|Dirt Block}} Blocco di terra
{{tr|lang=it|Dirt block}} Dirt block
{{tr|lang=it| Dirt Block }} Blocco di terra
{{tr|lang=it|Dirt    Block}} Dirt Block

Translation databases

The following modules hold all translations that {{tr}} bases its output on.

Flag eg.svg Arabic: Module:Tr/db-ar (clear cache)
Flag bg.svg Bulgarian: Module:Tr/db-bg (clear cache)
Flag cn.svg Cantonese: Module:Tr/db-yue (clear cache)
Flag cn.svg Chinese: Module:Tr/db-zh (clear cache)
Flag cz.svg Czech: Module:Tr/db-cs (clear cache)
Flag dk.svg Danish: Module:Tr/db-da (clear cache)
Flag nl.svg Dutch: Module:Tr/db-nl (clear cache)
Flag fi.svg Finnish: Module:Tr/db-fi (clear cache)
Flag fr.svg French: Module:Tr/db-fr (clear cache)
Flag de.svg German: Module:Tr/db-de (clear cache)
Flag gr.svg Greek: Module:Tr/db-el (clear cache)
Flag in.svg Hindi: Module:Tr/db-hi (clear cache)
Flag hu.svg Hungarian: Module:Tr/db-hu (clear cache)
Flag id.svg Indonesian: Module:Tr/db-id (clear cache)
Flag it.svg Italian: Module:Tr/db-it (clear cache)
Flag jp.svg Japanese: Module:Tr/db-ja (clear cache)
Flag kr.svg Korean: Module:Tr/db-ko (clear cache)
Flag lv.svg Latvian: Module:Tr/db-lv (clear cache)
Flag lt.svg Lithuanian: Module:Tr/db-lt (clear cache)
Flag no.svg Norwegian: Module:Tr/db-no (clear cache)
Flag pl.svg Polish: Module:Tr/db-pl (clear cache)
Flag pt.svg Portuguese: Module:Tr/db-pt (clear cache)
Flag ro.svg Romanian: Module:Tr/db-ro (clear cache)
Flag ru.svg Russian: Module:Tr/db-ru (clear cache)
Flag sk.svg Slovak: Module:Tr/db-sk (clear cache)
Flag es.svg Spanish: Module:Tr/db-es (clear cache)
Flag es.svg Spanish (formal): Module:Tr/db-es-formal (clear cache)
Flag se.svg Swedish: Module:Tr/db-sv (clear cache)
Flag th.svg Thai: Module:Tr/db-th (clear cache)
Flag tr.svg Turkish: Module:Tr/db-tr (clear cache)
Flag ua.svg Ukrainian: Module:Tr/db-uk (clear cache)
Flag vn.svg Vietnamese: Module:Tr/db-vi (clear cache)

See also

  • {{tr2e}} for the reverse functionality, translating a term from a local language back to English.