Template:Trans: Difference between revisions
Added a new optional parameter to add a link to an old version
m (wording) |
(Added a new optional parameter to add a link to an old version) |
||
Line 1:
<includeonly><div class="examplemeta translation">'''Translation of''': {{#if:{{{version|}}}|[http://{{SERVERNAME}}/mw/index.php?oldid={{{version}}}#{{{1}}} {{{1}}} (old version)]|{{#if:{{{subpage|}}}|[[../{{{1}}}|{{{1}}}]]|[[#{{{1}}}|{{{1}}}]]}}}}{{#if:{{{2|}}}| – {{{2}}} }}</div></includeonly><noinclude>
This template marks a programming example as a translation of another one on the same task page.
Line 17:
|-
| <code>subpage</code> — || Set to 1 if the examples for this task are on subpages (i.e. pages named ''Taskname/Langname''), so that the link can be adjusted accordingly.
|-
| <code>version</code> — || Set to a version number if you want to link to an old version page
|}
Line 32 ⟶ 34:
| <tt><nowiki>{{trans|Python|subpage=1}}</nowiki></tt>
| {{trans|Python}}
|-
| <tt><nowiki>{{trans|Haskell|version=256063}}</nowiki></tt>
| {{trans|Haskell|version=256063}}
|}
|