Template:T/doc: Difference between revisions
(no link documentation) |
(Mention database and update/fix usage description and issues) |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
A template used to translate links from English to the current | A template used to translate links from English to the current article's language (subpage language code). The names are generated based on the data in [[:Template:Translation]] database. | ||
==Usage== | ==Usage== | ||
Line 24: | Line 24: | ||
[[Hammer/pl|Młotki]] | [[Hammer/pl|Młotki]] | ||
Which still links to [[Hammer/pl]]. | |||
===Remove link=== | ===Remove link=== | ||
Line 34: | Line 36: | ||
'''Will result in:''' | '''Will result in:''' | ||
Młotek |
Revision as of 23:13, 1 May 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. |
A template used to translate links from English to the current article's language (subpage language code). The names are generated based on the data in Template:Translation database.
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