Template:T/doc: Difference between revisions
(Mention database and update/fix usage description and issues) |
(adjusted intro and mentioned Template:Translation) |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
The {{tlx|T}} template is used to translate links from English to the current article's language (subpage language code). The names are generated based on the data in the [[:Template:Translation]] database. | |||
This is not to be confused with the <code>{{[[Template:Translation|Tr]]}}</code> template, which is a shorthand way of writing the {{tlx|translation}} template. | |||
==Usage== | ==Usage== |
Revision as of 14:26, 28 July 2023
This is a documentation subpage for Template:T.
It contains usage information and other content that is not part of the original template page. |
The {{T}}
template is used to translate links from English to the current article's language (subpage language code). The names are generated based on the data in the Template:Translation database.
This is not to be confused with the {{Tr}}
template, which is a shorthand way of writing the {{translation}}
template.
Usage
Default translation
If the current article subpage is /pl
(Polish):
{{T|Hammer}}
Will result in:
Which links to Młotek.
Custom translation
Similar to a normal link, a pipe |
can be used after the English word, then proceeded by the desired word/phrase.
For example on a Polish page:
{{T|Hammer|Młotki}}
Will result in:
Which still links to Młotek.
Remove link
Alternatively, the link can be removed, showing only the translated text.
For example on a Polish page:
{{T|Hammer|no link}}
Will result in:
Młotek