Modèle:Tr

De Terraria Wiki
Aller à la navigation Aller à la recherche
Ce modèle utilise Lua.
Ce modèle utilise Module:Tr, un script écrit dans le language de programmation Lua. Pour en apprendre plus à propos Lua, visiter Terraria Wiki:Lua (en).
Template-info.svg Documentation La documentation ci-dessous est transcluse de Modèle:Tr/doc. (modifier | historique)

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.

Usage

{{ 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.

link

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).

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.

Examples

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=fr|Dirt Block}} Bloc de terre
{{tr|lang=fr|Dirt Wings}} Dirt Wings
{{tr|lang=fr|Dirt Block|link=y}} Bloc de terre

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

Code Result
{{tr|lang=fr|Dirt Block}} Bloc de terre
{{tr|lang=fr|Dirt block}} Dirt block
{{tr|lang=fr| Dirt Block }} Bloc de terre
{{tr|lang=fr|Dirt    Block}} Dirt Block

See also

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