Template:Pagename2en
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 ("Wood", 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 |