Template:L/doc: Difference between revisions
Jump to navigation
Jump to search
Important:Don't use on English pages or templates that would transclude this on an English page. Will not work properly there and is not supposed to avoid any extra unnecessary checks as this template should remain as light as possible. If transclusion to an English page is needed use more expensive version of this template {{Lx}} which also automatically checks for namespace to place the prefix in proper place.
(Created page with "A convenience template for articles in other languages. <pre>{{L|Targetname}} while on pages starting with Zh/ prefix becomes: Targetname </pre> <pre>{{L|Ta...") |
No edit summary |
||
(14 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
Template to use for links to main namespace pages on non-English articles. Will also have link to English version of the page next to it in parentheses. | |||
Parameters: | |||
* {{param|1}} - page to link | |||
* {{param|2}} - alt name | |||
* {{param|lang}} - to choose a language manually. Use this in namespaces that don't use language prefix. (i.e NOT main, Valve Developer Community, Help or Category namespace). As Template:L is not meant to be used on English pages this param also serves as a way to error check yourself and be sure where exactly you are linking. | |||
{{important|Don't use on English pages or templates that would transclude this on an English page. Will not work properly there and is not supposed to avoid any extra unnecessary checks as this template should remain as light as possible. If transclusion to an English page is needed use more expensive version of this template {{T|Lx}} which also automatically checks for namespace to place the prefix in proper place. }} | |||
<pre>{{L|Targetname}} while on pages starting with Zh/ prefix | <pre>{{L|Targetname}} while on pages starting with Zh/ prefix | ||
becomes: | becomes: | ||
Line 8: | Line 16: | ||
[[Zh/Targetname|Name]] | [[Zh/Targetname|Name]] | ||
</pre> | </pre> | ||
<pre> | |||
{{L|some Page#subsection|altlink}} while on pages starting with Ru/ prefix | |||
becomes: | |||
[[Ru/Some Page#subsection|altlink]] | |||
</pre> | |||
<pre>{{L|logic_auto}} while on pages starting with Ru/ prefix | |||
becomes: | |||
[[Ru/Logic_auto|logic_auto]] | |||
</pre> | |||
== See Also == | |||
* {{T|LCategory}} | |||
* {{T|LProject}} | |||
* {{T|LHelp}} | |||
* {{T|LSpecial}} | |||
* {{T|ACategory}} | |||
* {{T|Lx}} |
Latest revision as of 04:59, 14 August 2024
Template to use for links to main namespace pages on non-English articles. Will also have link to English version of the page next to it in parentheses.
Parameters:
- {{{1}}} - page to link
- {{{2}}} - alt name
- {{{lang}}} - to choose a language manually. Use this in namespaces that don't use language prefix. (i.e NOT main, Valve Developer Community, Help or Category namespace). As Template:L is not meant to be used on English pages this param also serves as a way to error check yourself and be sure where exactly you are linking.

{{L|Targetname}} while on pages starting with Zh/ prefix becomes: [[Zh/Targetname|Targetname]]
{{L|Targetname|Name}} while on pages starting with Zh/ prefix becomes: [[Zh/Targetname|Name]]
{{L|some Page#subsection|altlink}} while on pages starting with Ru/ prefix becomes: [[Ru/Some Page#subsection|altlink]]
{{L|logic_auto}} while on pages starting with Ru/ prefix becomes: [[Ru/Logic_auto|logic_auto]]