Difference between revisions of "Template:Local"

From PC-BSD Wiki
Jump to: navigation, search
(Hmm.. glorious distractions caused me to think this was broken.)
Line 7: Line 7:
 
: '''Example:''' <nowiki>[[Disk_Selection_Screen#Advanced_Mode|Advanced Mode]]</nowiki> '''becomes''' <nowiki>{{local|link=Disk_Selection_Screen|anchor=Advanced_Mode|Advanced Mode}}</nowiki>
 
: '''Example:''' <nowiki>[[Disk_Selection_Screen#Advanced_Mode|Advanced Mode]]</nowiki> '''becomes''' <nowiki>{{local|link=Disk_Selection_Screen|anchor=Advanced_Mode|Advanced Mode}}</nowiki>
 
[[category:templates]]</noinclude>[[category:Uses local]]
 
[[category:templates]]</noinclude>[[category:Uses local]]
 +
<!-- Need to figure a way to use a variable for version which could then be eliminated from the text shown for the link -->

Revision as of 02:46, 17 February 2014


This template hopes to solve the trouble of localization of links within the wiki. The link will automatically match the localized page URL (such as Goals and features/en) of the page that the link resides. As with other locations on the wiki, if the page for the local link has not yet been translated, it will not then exist and will appear as a red link.

Usage: {{local|link=page URL|alternate text}}
Usage: {{local|static=page URL|alternate text}}
Example: [[Goals and Features|Project Goals and Spiffy Bits]] becomes {{local|link=Goals and Features|Project Goals and Spiffy Bits}}
Example: [[Disk_Selection_Screen#Advanced_Mode|Advanced Mode]] becomes {{local|link=Disk_Selection_Screen|anchor=Advanced_Mode|Advanced Mode}}