Template:UselangLink/doc

From "PTTLink Wiki"
< Template:UselangLink
Revision as of 08:41, 21 January 2022 by Kg7qin (talk | contribs) (Created page with "{{TemplateBox |1= |1d= |1def= |1stat= |name= |desc=Returns a link to the corresponding language version of the page it's used on. |namespace= |usergroup= |placement= |usage-no...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Returns a link to the corresponding language version of the page it's used on.

Usage

{{UselangLink/doc |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1emptyoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified Takes a mandatory unnamed parameter containing a language code.

The text of the link defaults to the language's autonym, and the optional named parameter |text= can be used to replaced it.

If the dummy parameter |bare= is present, only the target link will be returned.

The content of the optional named parameter |action= will be appended to the URL with a leading "&".

Uses only magic words, should work on any MediaWiki installation.

Examples

  • {{UselangLink|ja}} yields 日本語
  • {{UselangLink|ja|text=Japanese}} yields Japanese
  • {{UselangLink|ja|bare=yes}} yields //wiki.pttlink.org/index.php?title=Template:UselangLink/doc&uselang=ja
  • {{UselangLink|INVALID}} yields invalid
  • {{UselangLink|ja|bare=yes|action=action=edit}} yields //wiki.pttlink.org/index.php?title=Template:UselangLink/doc&uselang=ja&action=edit
  • {{UselangLink|ja|bare=yes|action=action=edit}} yields //wiki.pttlink.org/index.php?title=Template:UselangLink/doc&uselang=ja&action=edit&section=1
  • {{UselangLink|ja|bare=yes|action=action=edit}} yields //wiki.pttlink.org/index.php?title=Template:UselangLink/doc&uselang=ja&action=history

Warning: Default sort key "UselangLink" overrides earlier default sort key "UselangLink/doc".