Template:Ll
[[Special:MyLanguage/{{{1}}}|{{{2}}}]]
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
It 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
Use | Becomes |
---|---|
{{ll|Help:Aliases}}
|
Help:Aliases |
{{ll|Wikidata:Administrators|管理者}}
|
管理者 |
{{ll|Help:Statements|anchor=Values}}
|
Help:Statements |
{{ll|Help:Statements|Custom title|Values}}
|
Custom title |
See also
The above documentation is transcluded from Template:Ll/doc (edit | history). Editors can experiment in this template's sandbox (edit | diff) and testcases (create) page. Please add categories to the /doc subpage. Subpages of this template. |