• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Wikidata sitelink/sandbox

  • Template
  • Talk
  • Language
  • Watch
  • Edit
< Template:Wikidata sitelink
This is the template sandbox page for Template:Wikidata sitelink (diff).
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 90,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.

Usage

edit
This template uses Lua:
  • Module:WikidataIB (sandbox)

This template gets the specified interlanguage link for the current article from Wikidata. If not found or a Wikidata item for the article does not exist, it will return an empty string. Use the |lang= parameter to specify an ISO 639-1 language code, and optionally, the |project= parameter if you want to get the link for a project other than Wikipedia. Note that the template will only return the page name, it does not automatically create a link.

See also Template:Interwiki extra for automatically adding links to other languages from a Wikidata item.

Examples

edit
  • {{Wikidata sitelink|lang=cy}} →
  • {{Wikidata sitelink|lang=cy|project=wikiquote}} →

TemplateData

edit

This template gets the specified interlanguage link for the current article from Wikidata. If not found or a Wikidata item for the article does not exist, it will return an empty string.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
langlang

ISO 639-1 language code specifying the language you want to get the sitelink for.

Example
de
Stringrequired
projectproject

The project to get the sitelink for, if not Wikipedia.

Default
wiki
Example
wikiquote
Stringoptional
The above documentation is transcluded from Template:Wikidata sitelink/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Wikidata_sitelink/sandbox&oldid=934902590"
Last edited on 9 January 2020, at 05:03

Languages

      This page is not available in other languages.

      Wikipedia
      • Wikimedia Foundation
      • Powered by MediaWiki
      • This page was last edited on 9 January 2020, at 05:03 (UTC).
      • Content is available under CC BY-SA 4.0 unless otherwise noted.
      • Privacy policy
      • About Wikipedia
      • Disclaimers
      • Contact Wikipedia
      • Code of Conduct
      • Developers
      • Statistics
      • Cookie statement
      • Terms of Use
      • Desktop