Template:Llink: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
{{#if: {{{1|}}}
==The Llink Template==
  |{{#if: {{{anchor|}}}
    |{{#if: {{{text|}}}
      |{{LocalizedLink|{{{1}}}|anchor={{{anchor}}}|text={{{text}}}}}
      |{{LocalizedLink|{{{1}}}|anchor={{{anchor}}}}}
    }}
    |{{#if: {{{text|}}}
      |{{LocalizedLink|{{{1}}}|text={{{text}}}}}
      |{{LocalizedLink|{{{1}}}}}
    }}
  }}
  |{{#if: {{{anchor|}}}
    |{{#if: {{{text|}}}
      |{{LocalizedLink|anchor={{{anchor}}}|text={{{text}}}}}
      |{{LocalizedLink|anchor={{{anchor}}}}}
    }}
    |Invalid link
  }}
}}
<noinclude>==The Llink Template==


The standard method for creating Wikilinks doesn't work very well in the Translation Extension, so this '''llink''' template is used instead.
The standard method for creating Wikilinks doesn't work very well in the Translation Extension, so this '''llink''' template is used instead.
Line 21: Line 39:


Note that for languages which use certain special characters, the text after the above hash sign might have been automatically converted into a compatible format, which might seem a little confusing at first. For example, in the case of Esperanto, the above link appears as ''...#Privataj_mesa.C4.9Doj'' rather than ''...#Privataj_mesaĝoj''. Make sure that you use the converted form.</noinclude>
Note that for languages which use certain special characters, the text after the above hash sign might have been automatically converted into a compatible format, which might seem a little confusing at first. For example, in the case of Esperanto, the above link appears as ''...#Privataj_mesa.C4.9Doj'' rather than ''...#Privataj_mesaĝoj''. Make sure that you use the converted form.</noinclude>
{{#if: {{{1|}}}
  |{{#if: {{{anchor|}}}
    |{{#if: {{{text|}}}
      |{{LocalizedLink|{{{1}}}|anchor={{{anchor}}}|text={{{text}}}}}
      |{{LocalizedLink|{{{1}}}|anchor={{{anchor}}}}}
    }}
    |{{#if: {{{text|}}}
      |{{LocalizedLink|{{{1}}}|text={{{text}}}}}
      |{{LocalizedLink|{{{1}}}}}
    }}
  }}
  |{{#if: {{{anchor|}}}
    |{{#if: {{{text|}}}
      |{{LocalizedLink|anchor={{{anchor}}}|text={{{text}}}}}
      |{{LocalizedLink|anchor={{{anchor}}}}}
    }}
    |Invalid link
  }}
}}

Revision as of 10:11, 28 September 2013

Invalid link

The Llink Template

The standard method for creating Wikilinks doesn't work very well in the Translation Extension, so this llink template is used instead.

  • 1. Linking to another wiki page:

English version:{{llink|Main menu|text=Main menu}}
Esperanto version:{{llink|Main menu|text=ĉefa menuo}}

"Main menu" is the name of the original English version of the page. You should never translate this as the llink template will automatically redirect users to the translated version. You should however translate the part after text=. In the example, the Esperanto translation "ĉefa menuo" has been entered.

  • 2. Linking to a certain section of another wiki page:

English version: {{llink|Profile|anchor=Personal_Messaging|text=Personal Message Options}}
Dutch version: {{llink|Profile|anchor=Persoonlijke_berichten|text=Persoonlijke berichten opties}}

Again, don't translate the English name of the original page ("Profile" in this case). But do translate the words after text=, as these are the words that will appear in the link on the page. The anchor= marks the part of the Profile page that the link will lead to. The target of anchor= has to be changed in order to work correctly on the translated page. For example, in the case of the Dutch translation it has to be changed to anchor=Persoonlijke_berichten. You can discover what to enter after anchor= by going to the translated version of the page (in this case, Profile), then click on the the translated title of Personal Messaging in the Table of Contents. You will then see the required text in the address bar of your browser, the part after the hash sign (#). For example, in the case of the Dutch version:

http://wiki.simplemachines.org/smf/Profile/nl#Persoonlijke_berichten

Note that for languages which use certain special characters, the text after the above hash sign might have been automatically converted into a compatible format, which might seem a little confusing at first. For example, in the case of Esperanto, the above link appears as ...#Privataj_mesa.C4.9Doj rather than ...#Privataj_mesaĝoj. Make sure that you use the converted form.



Advertisement: