Template:Tr

From Infernum Mod 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 tgc: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. This template is an important part of localization mod wikis to other languages.

Usage

{{ tr | <term to translate> | lang = <target language> (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, 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.

vanilla

Boolean value. If set it uses only vanilla database.

Examples

Code Result
{{tr|Zenith}} Zenith
{{tr|Zenith|lang=zh}} 天顶剑
{{tr|zenith|lang=zh}} zenith
{{lang/set|ru}}
{{tr|Terra Blade}} Терра-клинок
{{tr|Call Upon The Eggs|vanilla=y}} Call Upon The Eggs
{{tr|Call Upon The Eggs}} Призыв к Яйцам

Translation databases

List of translation databases (purge DBs):

Language Database
vanilla
Database
mod
Load data
Flag cn.svg Chinese: Module:Tr/vanilla-zh (edit) Module:Tr/db-zh (edit) Module:Tr/loaddata-zh
Flag us.svg English: Module:Tr/vanilla-en (edit) Module:Tr/db-en (edit) Module:Tr/loaddata-en
Flag ru.svg Russian: Module:Tr/vanilla-ru (edit) Module:Tr/db-ru (edit) Module:Tr/loaddata-ru