Template:Page language link: Difference between revisions
From Vintage Story Wiki
No edit summary |
m (use Template:Documentation) |
||
(3 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
< | <onlyinclude><!-- | ||
-->{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--><!-- | |||
-->|<b><!-- | |||
-->{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--> | -->}}[[:{{#ifexist:{{{1}}}/{{PAGELANGUAGE}}|{{{1}}}/{{PAGELANGUAGE}}|Special:MyLanguage/{{{1}}}}}|{{#if:{{{2|}}}|{{{2}}}|{{{2|{{#ifexist:Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page display title/{{PAGELANGUAGE}}<!--if the source page, pagelang2 returns en--><!-- | ||
|<b> | -->|{{#if:{{{nsp|}}}<!-- | ||
}}[[Special:MyLanguage/{{{1}}}|{{#if:{{{2|}}}|{{{2}}}|{{{2|{{#ifexist:Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page display title/{{PAGELANGUAGE}}<!--if the source page, | -->|{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} }}<!-- | ||
|{{#if:{{{nsp|}}} | -->|{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }}<!-- | ||
|{{PAGENAME:{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} }} | -->}}<!-- | ||
|{{ {{TNTN|Translations:{{#if:{{NAMESPACE:{{{1}}}}}|{{NAMESPACE:{{{1}}}}}:}}{{PAGENAME:{{{1}}}}}/Page_display_title}} }} | --><!--if the translation page does not exist (or called from the source page), output as is--><!-- | ||
}} | -->|{{#if:{{{nsp|}}}<!-- | ||
<!--if the translation page does not exist (or called from the source page), output as is--> | -->|{{PAGENAME:{{{1}}}}}<!-- | ||
|{{#if:{{{nsp|}}} | -->|{{{1}}}<!-- | ||
|{{PAGENAME:{{{1}}}}} | -->}}<!-- | ||
|{{{1}}} | -->}}}}}}}]]{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--><!-- | ||
}} | -->|</b><!-- | ||
}}}}}}}]]{{#ifeq:{{FULLPAGENAME:{{{1}}}}}|{{FULLPAGENAME:{{translatable}}}}<!--self link (including translation pages)--> | -->}}<span style="display:none"><!-- | ||
|</b> | -->[[:{{#ifexist:{{{1}}}/{{PAGELANGUAGE}}|{{{1}}}/{{PAGELANGUAGE}}|{{{1}}}}}| ]]<!-- T63547 --><!-- | ||
}}<span style="display:none">[[:{{{1}}}| ]]</span><!-- | --></span><!-- | ||
--></onlyinclude><noinclude> | |||
{{ | {{Documentation}} | ||
[[Category:Translation templates]] | |||
</noinclude> |
Latest revision as of 22:36, 17 November 2023
[[:Special:MyLanguage/{{{1}}}|{{{1}}}]]
[view | edit | history | purge this page]Documentation
Copied from MediaWiki.
This template is intended for use on translatable pages. It adds a link that points to a translated page in the language that is the same as the language of the current page. If a translated page doesn't exist, it points to the page in the source language.
It is different from Template:Localized link {{Ll}}
, which links to a page in the language defined in the user's preferences using Special:MyLanguage.
Usage
{{Pll|target page|text}}
Description
This function takes three parameters:
- Target page (
1
). This is required. This is the target page, without language suffix. - Text (
2
). This is suggested, but not required. Optional text to show. If not given, the link target will be shown. - nsp (
nsp
). This is optional. If “nsp” parameter is not defined, as link text displays the full pagename (including namespace); otherwise — if “nsp” parameter is defined by any value — link text displays the short pagename, without namespace.
[view | edit | history | purge this page]The above documentation is transcluded from Template:Page language link/doc.