Sorry for the inconvenience.  Chance of typos in templates, the navigation header should be functional for most versions of the handbook.
Potential remains for unforeseen breakage primarily in the handbook portion of the wiki.
Notice will be up until above verified and no other troubles found from recent modifications.

Difference between revisions of "Template:Local"

From PC-BSD Wiki
Jump to: navigation, search
(Hmm.. glorious distractions caused me to think this was broken.)
(45 intermediate revisions by one user not shown)
Line 1: Line 1:
<includeonly>{{#if: {{{1}}}|{{#if: {{{anchor}}}|[[{{{link|}}}{{putLang}}{{pound}}{{{anchor}}}{{!}}{{{1{{!}}{{#if: {{getLang}}|{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}} }}|{{{link|Missing link}}} }} }}}]]|{{#if: {{{anchor}}}|[[{{{link}}}{{putLang}}{{pound}}{{{anchor}}}]]|[[{{{link}}}{{putLang}} }}]]}} }} |[[{{{link}}}{{putLang}}]] }}</includeonly><noinclude>
+
<includeonly><span class="usesLocal">{{#if: {{{link|}}}|[[{{{link}}}{{putVers}}{{putLang}}{{hasAnchor|{{{anchor|}}}}}|{{{1|{{#if: {{getLang}}|{{:Translations:{{#titleparts: {{{link}}}|1|1}}{{putVers}}/Page display title/{{getLang}}}}|{{{link|Missing link}}}}}}}}]]|}}{{#if: {{{static|}}}|[[{{{static}}}{{putLang}}{{hasAnchor|{{{anchor|}}}}}|{{{1|{{#if: {{getLang}}|{{:Translations:{{#titleparts: {{{static}}}|1|1}}/Page display title/{{getLang}}}}|{{{static|Missing static}}}}}}}}]]|}}{{#if: {{{bare|}}}|[[{{{bare}}}{{hasAnchor|{{{anchor|}}}}}|{{{1|}}}]]|}}</span></includeonly><noinclude>
 
+
 
+
 
+
{{#if: {{{1}}}
+
  |{{#if: {{{anchor}}}
+
      |[[{{{link|}}}{{putLang}}{{pound}}{{{anchor}}}{{!}}{{{1{{!}}{{#if: {{getLang}}
+
                                                                  |{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}} }}{{!}}{{{link|Missing link}}} }} }}}]]
+
                                                                  |{{#if: {{{anchor}}}
+
                                                                      |[[{{{link}}}{{putLang}}{{pound}}{{{anchor}}}]]
+
                                                                      |[[{{{link}}}{{putLang}}  
+
                                                                  }}]]
+
                                                              }}
+
    }}
+
  |[[{{{link}}}{{putLang}}]]
+
}}
+
 
+
 
+
{{{1}}} is the alternate text.
+
 
+
[[{{{link|}}}|{{{1|{{#if: {{getLang}}|{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}}}}|{{{link|Missing link}}} }} }}}]]
+
  
 
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.
 
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:''' '''<nowiki>{{local|</nowiki>link='''''page URL'''''|'''''alternate text'''''}}'''
 
: '''Usage:''' '''<nowiki>{{local|</nowiki>link='''''page URL'''''|'''''alternate text'''''}}'''
 
+
: '''Usage:''' '''<nowiki>{{local|</nowiki>static='''''page URL'''''|'''''alternate text'''''}}'''
 
: '''Example:''' <nowiki>[[Goals and Features|Project Goals and Spiffy Bits]]</nowiki> '''becomes''' <nowiki>{{local|link=Goals and Features|Project Goals and Spiffy Bits}}</nowiki>
 
: '''Example:''' <nowiki>[[Goals and Features|Project Goals and Spiffy Bits]]</nowiki> '''becomes''' <nowiki>{{local|link=Goals and Features|Project Goals and Spiffy Bits}}</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]]

Revision as of 13:49, 22 December 2013


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}}
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox