Template:Pagename2en

From Terraria Wiki
(Redirected from Template:Tr2e)
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:Pagename2en/doc. (edit | history)

This template translates a page name to its English name, i.e. in the reverse direction of {{tr}}. It is solely used by templates, such as {{item infobox}}, and is not intended to be used in a stand-alone way.

If the page is a translation subpage, like Dirt Block/it, it will simply return the base page name ("Dirt Block", in this case). Otherwise, such as when used in language wikis, it will return the respective entry of the translation database (Module:Tr/db-<language code>; see full list).

When used on this wiki on a page that is not a translation subpage, it will simply return the page name.

Usage

{{ pagename2en | <page name> | lang = <target language> }}

First unnamed parameter

Name of the page to translate. Defaults to {{PAGENAME}}.

lang

The ISO 639-1 (or ISO 639-3) code of the target language, defaults to {{lang}}.

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
{{pagename2en|lang=it|Dirt Block/it}} Dirt Block
{{pagename2en|lang=it|Blocco di terra}} Dirt Block
{{pagename2en|lang=it|Tables/it/row}} Tables/row
{{pagename2en|Dirt Block}} Dirt Block
{{pagename2en|lang=ru|Зенит}} Zenith