Modèle:Tr

De Terraria Wiki
Aller à : navigation, rechercher
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 | lang = <target language> (optional) | <term to translate> | link = y (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.

lang

Language code of the language to translate the term into. Defaults to {{lang}}, so it can almost always be omitted.

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) since these have page names in their languages, its effect is important for the other language wikis, whose page names are in English.

Examples

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

Code Result
{{tr|lang=fr|Dirt Block}} Bloc de terre
{{tr|lang=en|Dirt Wings}} Dirt Wings
{{tr|lang=en|Dirt Block|link=y}} Dirt Block

Based on performance considerations, input text is case-sensitive and whitespace-sensitive.

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

See also

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