Template:Ll/doc
This is a documentation subpage for Template:Ll. It contains usage information, categories, and other content that is not part of the original template page. |
This template can be used to link to translatable pages in the user’s language. It uses the special page Special:MyLanguage, which checks if there is a translated version of a page in the user's language, and links to it if there is one, and links to the English version if there isn’t. It should be used in translated pages, so that they link to the right page even if there is no translated page in that language.
Parameter | Description | Type | Status | |
---|---|---|---|---|
target | 1 | The target page’s (the English original’s) title. The parameter value itself must not contain the Special:MyLanguage prefix, or the link won’t work at all.
| Page name | required |
display text | 2 | The displayed link text, by default the target page title localized to the current interface language, if available (otherwise the English original title)
| Line | optional |
anchor | 3 anchor | The anchor to link to within the page. Note that this doesn’t get magically translated, so there should be an untranslatable anchor; relying on the automatic anchors based on headers will break in translations. | Line | optional |
Usage
editIt is used in the same way normal wikilinks are used: One parameter to use the same link text as the page name, two parameters for different page name and link text.
Third parameter (also named anchor) may be used for transferring anchor value (for link to custom section) into translatable link.
Examples
editUse | Becomes |
---|---|
{{ll|Help:Aliases}}
|
Help:Aliases |
{{ll|Wikidata:Administrators|管理者}}
|
管理者 |
{{ll|Help:Statements|anchor=Values}}
|
Help:Statements |
{{ll|Help:Statements|Custom title|Values}}
|
Custom title |