This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

User:Astaecker/Link/doc

From Gentoo Wiki (test)
Jump to:navigation Jump to:search

Use this template to create an internal link. The template rewrites the link to link to the same language subpage of the target page as the language subpage of the source page, if existing. Else fallback to the english version.

Rationale

On translated pages you have the following problem with internal links. E.g. you want to link the article "Foo" and the translation of "Foo" doesn't exists right now. You can:

  • link the english page of "Foo".
Pro: You link to an available guide.
Contra: Later, when "Foo" gets translated, you're guiding the reader to an english page. There he has to select his language again. To save the reader from this hassle, you have to change all links to "Foo" in all translated pages.
  • link the translated page of "Foo" (right now not existing).
Pro: Later, when "Foo" gets translated, you're guiding the reader to the translated page.
Contra: Until "Foo" gets translated, you're pointing to an non-existing page. The readers has to get active, to even get to the english page.

This template solves this problem.

Usage

Add this code to the page text
{{User:Astaecker/Link|Kernel}}

Kernel

Simulation a german (de) origin page
{{User:Astaecker/Link|Kernel|lang=de}}
{{User:Astaecker/Link|Main Page|lang=de}}


For a different link text
{{User:Astaecker/Link|Kernel|Linux Kernel}}

Linux Kernel