Difference between revisions of "Template:Local"

From PC-BSD Wiki
Jump to: navigation, search
Line 1: Line 1:
<includeonly>[[{{#if: {{{1}}}|{{#if: {{{anchor}}}|{{{link|}}}{{putLang}}#{{{anchor}}}|{{{link|}}}{{putLang}}}}|{{{1}}}|{{#if: {{getLang}}|{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}}}}|}}}}]]</includeonly><noinclude>
+
<includeonly>[[{{#if: {{{1}}}|{{#if: {{{anchor}}}|{{{link|}}}{{putLang}}#{{{anchor}}}|{{{link|}}}{{putLang}}}}{{!}}{{{1}}}]]|{{#if: {{{anchor}}}|{{{link|}}}{{putLang}}#{{{anchor}}}|{{{link|}}}{{putLang}}}}{{#if: {{getLang}}|{{!}}{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}}}}]]|]]}}}}</includeonly><noinclude>
  
 
+
<!--
[[
+
[[{{#if: {{{1}}}
{{#if: {{{1}}}
+
 
   |{{#if: {{{anchor}}}  <!-- has alt text -->
 
   |{{#if: {{{anchor}}}  <!-- has alt text -->
 
       |{{{link|}}}{{putLang}}#{{{anchor}}}  <!-- has anchor -->
 
       |{{{link|}}}{{putLang}}#{{{anchor}}}  <!-- has anchor -->
       |{{{link|}}}{{putLang}}                       <!-- not anchor -->
+
       |{{{link|}}}{{putLang}}               <!-- not anchor -->
     }}|{{{1}}}
+
     }}{{!}}{{{1}}}]]
   |{{#if: {{getLang}}  <!-- not alt text -->
+
   |{{#if: {{{anchor}}}  <!-- not alt text -->
             |{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}} }}  <!-- on lang page -->
+
      |{{{link|}}}{{putLang}}#{{{anchor}}}  <!-- has anchor -->
             |                                                                                  <!-- no lang page -->
+
      |{{{link|}}}{{putLang}}              <!-- not anchor -->
 +
    }}{{#if: {{getLang}}
 +
             |{{!}}{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}} }}]] <!-- on lang page -->
 +
             |]]                                                                                   <!-- no lang page -->
 
         }}
 
         }}
 
}}
 
}}
]]
+
 
 +
 
 +
[[{{#if: {{{1}}}|{{#if: {{{anchor}}}|{{{link|}}}{{putLang}}#{{{anchor}}}|{{{link|}}}{{putLang}}}}{{!}}{{{1}}}]]|{{#if: {{{anchor}}}|{{{link|}}}{{putLang}}#{{{anchor}}}|{{{link|}}}{{putLang}}}}{{#if: {{getLang}}|{{!}}{{:Translations:{{#titleparts: {{{link}}}|1|1}}/Page display title/{{getLang}}}}]]|]]}}}}
 +
 
 +
-->
 +
 
  
 
Work in progress: 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.
 
Work in progress: 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.

Revision as of 21:55, 3 September 2013


      |#{{{anchor}}}  
      |               
   }}|{{{1}}}]]
  |
  1. {{{anchor}}}]]

}}


[[

  1. {{{anchor}}}|{{{1}}}]]

-->


Work in progress: 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}}
Example: [[Goals and Features|Project Goals and Spiffy Bits]] becomes {{local|link=Goals and Features|Project Goals and Spiffy Bits}}
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox