Help:Sitelinks

From Wikidata
Jump to navigation Jump to search
Translate this page; This page contains changes. Please contact a translation admin to mark them for translation.
Wikidata screenshot – adding a new sitelink

Sitelinks (also known as interwiki links or interlanguage links) are special links that contain a site and a page title, and go from individual items in Wikidata to pages on other Wikimedia sites such as Wikipedia, Wikisource and Wikivoyage.

They allow easy navigation between language versions of an article or page on the same concept, using a linked Wikidata item as a central hub. Sitelinks replaced the local, on-wiki links system referred to as interwiki links or interlanguage links.
Sitelinks populate the "In Other Languages" section, allowing readers to switch to a corresponding page in their preferred language (or any other that is sitelinked). There is no guarantee that the page content will be the same as every language community is responsible for writing their pages. However, this does allow editors to cross-reference content between different language articles to research, expand or update their page accordingly.

Language-independent general principles

[edit]
Interlanguage links manually connect an article with another on a different language Wikimedia project.
Sitelinks use a Wikidata item as a hub to link all related articles in other languages and Wikimedia projects.

Usage

[edit]

Typically items have at least one corresponding page on a Wikimedia site such as Wikipedia, Wikivoyage, Wikisource, Wikiquote, or Wikimedia Commons (however, there are some exceptions to this rule). Having at least one sitelink ensures that an item meets Wikidata's notability criteria. Sitelinks are also useful for ensuring that items in Wikidata represent only one unique concept. In cases when more than one item could reasonably correspond to the same Wikimedia page, it is likely that the items should be merged together.

Sitelinks serve as a replacement for a previous system of interlanguage links that was used to link from a page in one language on a Wikimedia site to an equivalent page in another language, for example the English Wikipedia page on Paris to the French Wikipedia page on Paris. These interlanguage links used to be stored locally on each Wikimedia site and maintained separately in each language so that if the name of a page on one Wikimedia site changed, then the other Wikimedia sites in each language would need to have their links updated to reflect the changes. Sitelinks thereby improve upon this system by having everything centralized in Wikidata. Sitelinks can have attached badges and will usually show that a page has been a featured article, or of similar status.

Linking to Wikimedia site pages

[edit]

Wikidata currently supports sitelinks for most Wikimedia projects (except Incubator, see phab:T54971). The site id for English Wikipedia is enwiki, for French Wikipedia frwiki and so on and for Commons commonswiki. The site id for English Wikimedia projects are enwikinews, enwikiquote, enwikisource, enwikivoyage etcetera.

Sitelinks are for linking items to standalone pages that already exist on Wikimedia sites. Wikidata sitelinks do not support anchors (links to a specific section of a page). Anchors are preceded by the "#" character on Wikimedia sites.

For example, a sitelink for the item for The Beatles (Q1299) should only link to the Wikipedia page on The Beatles (https://en.wikipedia.org/wiki/The_Beatles) — and not any sections of that page, such as https://en.wikipedia.org/wiki/The_Beatles#Discography. Moreover, it's not possible for any item on Wikidata to link to just the Discography section of The Beatles page because this would require an anchor link. However, it would be possible to link a different item, The Beatles discography (Q829965) to a different Wikipedia page (i.e. one that is completely devoted to The Beatles discography, such as https://en.wikipedia.org/wiki/The_Beatles_discography).

Note that each Wikimedia/Wikipedia page can only have one sitelink to any one Wikidata item page. You will receive an error message when attempting to add a new sitelink if the page is already connected to another item page (even when trying to link to a redirect page pointing to this particular page). If you receive an error message but believe the item you are editing is the most appropriate one for a sitelink, you may need to merge two items.
Please consult Help:Merge or visit Wikidata:Interwiki conflicts to report a conflict and ask for others to look at the situation.

To connect a redirect page to a Wikidata item, you need to also add a redirect badge (usually intentional sitelink to redirect (Q70894304)) to it. To add a badge, click the icon next to the input field for the page title when adding the sitelink. Previously you can alternatively use local interlanguage links; this is no longer recommended.

A more detailed discussion on how to connect multiple related pages to two or more Wikipedia language editions: Help:Handling sitelinks overlapping multiple items.

Wiktionary

[edit]

Wiktionary article pages use a different method for site linking articles between language versions, handled by the Extension: Cognate.The other namespaces (Template:, Help: Special:, etc.) in Wiktionary can still use Wikidata sitelinks to benefit from the multilingualism. Why is this?

Wiktionary 'sitelinks' (via cognate) work by exactly matching the article name and not a translation of the name. A Cognate sitelink for the word 'fire' between the English and German Wiktionary would mean both articles in both versions must have 'fire' in the article part of the URL:

With Wikidata sitelinks, moving from the English wikipedia article on 'Fire' to the German Wikipedia, would take you to 'Feuer'

Sitelinks for Wiktionary have specific tools and rules described on Wikidata:Wiktionary/Sitelinks.

Languages

[edit]

Sitelinks can be added to Wikimedia sites in more than 200 languages. When adding a sitelink for an item, you will need to input both the language of the Wikimedia site page that the item corresponds to and the title of the page as it appears on the Wikimedia site. You can only add a sitelink for a language and a Wikimedia site if a page on that language version of the Wikimedia site already exists.

Badges

[edit]

Badges for good and featured articles are stored on Wikidata right in front of the sitelink.

Namespaces

[edit]

The Wikidata community agreed in an RFC that most namespaces of Wikimedia projects other than "User" are eligible for storage on Wikidata. This means that in addition to sitelinks for pages like Wikipedia articles and Wikisource texts, sitelinks for categories, templates, and help pages can also be stored in Wikidata. For an example of a Wikidata item referring to a namespace, see item Wikimedia category (Q4167836), which includes sitelinks to w:Wikipedia:Categorization, q:Help:Category, and voy:Wikivoyage:Categories.

Note that when adding a sitelink for a page that is outside of a Wikimedia site's main namespace, you need to keep the namespace in the page title.

Examples:

Wikidata item: Wikimedia category (Q4167836)
Wikiquote page to add as sitelink: https://en.wikiquote.org/wiki/Help:Category
Wikimedia site to add under "Language Code": English enwikiquote
Page title to add under "Linked page": Help:Category

Wikidata item: Joan of Arc (Q7226)
Wikiquote page to add as sitelink: https://en.wikiquote.org/wiki/Joan_of_Arc
Wikiquote site to add under "Language Code": English enwikiquote
Page title to add under "Linked page": Joan of Arc

[edit]
[edit]

Editors on the English Wikipedia have created a great page with all the necessary information for editors. Much of the information will be relevant to contributors on other Wikimedia projects too.

[edit]

An individual page on a Wikimedia site can completely suppress Wikidata sitelinks by using the {{noexternallanglinks}} magic word. The magic word also supports suppression of sitelinks from only specific languages, for example, "{{noexternallanglinks:es|fr|it}}" would suppress only the Spanish, French, and Italian links. Neither of these uses prevents Wikidata from listing all sitelinks of an item.

Wikidata sitelinks can be turned off for specific articles, pages or languages by invoking the Magic Word: in the page source text. It can be used in a few ways:

  • {{noexternallanglinks}} - disables all Wikidata sitelinks from displaying
  • {{noexternallanglinks:fr|id}} - when invoked with parameter(s) matching country codes, only those Wikidata sitelinks will be disabled.

    In this example, French and Indonesian sitelinks will be ignored.

  • {{noexternallanglinks:*}} - this is similar to the first example, where the asterisk (*) acts as a wildcard to match all languages.

The magic word does not disconnect or remove the sitelinks from the Wikidata item, but disables the Wikibase extension handling the Sitelink connection.

Local interlanguage links of the article are unaffected by {{noexternallanglinks}}. Entering [de][ar][pt][ru] in the source text will create active interlangauge links to the German, Arabic, Portuguese and Russian Wikipedia articles. Note: these links are monodirectional - they do not add manual interlanguage links back from the target page.

[edit]
Screenshot of "Languages" (Wikidata sitelinks) highlighted on a Wikimedia page

In the previous system of interlanguage links, an anchor link was used when a Wikimedia site did not have an exact match in another language for a corresponding page, but did have a page that dealt in part with the same subject. However, Wikidata does not support anchors as sitelinks. Previously, it is a practice to retain interlanguage links with anchors locally on the Wikimedia sites (not Wikidata); this is no longer recommended.

If you want to connect a section of a page (also called an anchor) to a Wikidata item, first find an appropriate redirect to that anchor (if none exists, create one), then connect the redirect to the item using Linking to Wikimedia site pages above.

Talk pages

[edit]

When linking from a Wikidata talk page (or most other pages other than items) to another Wikimedia project, a prefix is used in the wiki markup. For example, if one wished to link to the documentation about JSON format on mediawiki.org, one could write [[mediawikiwiki:Wikibase/DataModel/JSON]] and the result would be mediawikiwiki:Wikibase/DataModel/JSON.

A table of available prefixes may be found at Special:Interwiki.

Page renames

[edit]

When a page is renamed on a client wiki, the page move automatically updates the sitelink at Wikidata, if the renaming user has an active account on Wikidata.

Scenario: A new contributor at English Wikipedia, who has never visited Wikidata, renames an article. The sitelink at Wikidata will continue to point to the page title that has become a redirect.

When page moves aren't reflected on Wikidata, sometimes a second item for the new page title is created, leading to a duplicate on Wikidata. These should be merged.

A bot or Wikibase function could update sitelinks based on the pagemove log at Wikipedia (or other client wikis).

This is currently (November 2021) being done for German Wikipedia (Q48183) and English Wikipedia (Q328) by User:Krdbot.

It's appreciated if users who rename pages on client wikis log in to Wikidata once to create an account.

[edit]

At its default setting, the Wikimedia projects and Wikidata will not automatically connect article content with the relevant Wikidata item. If the article is a new concept, it might not exist on Wikidata yet, requiring a new Wikidata item to be described before a sitelink can be made. A Wikidata item may exist but if it was created in another source language first without a relevant translated label, you may not be able to find it easily with the search function. The Wikidata item may exist, but the label and/or description may be explained differently so that a search does not return it as a result. There are various gadgets that have been created to help facilitate sitelinking.


Is a gadget that when installed after changes to an article are published, will run a search of Wikidata for similar-matching page titles. It will return the Item QID, Label and Description of suggestions in a pop-up box on the current article page. From here you can:

  • Click the Q-ID to navigate to the Wikidata item if you wish to research further if the item is an appropriate match.
  • Click the radio button of the suggestion, and then click "Submit" to connect the current article page with the selected Wikidata item.

If no suggestions are returned or they are not appropriate matches, you can click the "Create new item" button. This will open the Item creation page on Wikidata with pre-filled fields based on the source articles' location and page title.


Is a tool that will display random articles (left-column) from a language-version of Wikipedia that hasn't been linked to a Wikidata item (right-column). It displays possible matches of Wikidata items (middle-column), so you can add it to an existing item, or create a new one.

Not sure about the suggested matches? There is a Skip button to move on to the next random article. There are a variety of buttons along the top-menu such as Music Sport Misc that indicate they might categorise the kind of articles that are presented, but testing seems to show this is not currently functional.


QRpedia is a website where you can paste a Wikipedia URL and it will generate a QR code. This can be printed and displayed on matching objects or concepts to provide users the ability to scan the QR code and return a mobile-friendly Wikipedia article utilizing the sitelinking functionality from Wikidata.

This means the article is available in all of the languages that are connected to the Wikidata item, allowing multiple translations for the user and the additional possibility of generating a Google Translation if a preferred language is missing.

A common use for QRpedia is for museum displays that do not have the space or resources to provide translations in multiple languages for all exhibits.

Games

[edit]

If you are new to Wikidata, the process of adding a sitelink may be daunting. There are several games that search Wikidata and the Wikimedia projects for items and articles that are not currently linked, but likely could be. There are several games editor's can play to that make the process of adding sitelinks accessible and present items and articles missing sitelinks to the editor.

The Distributed game A series of games to facilitate easy on-rails editing, sitelinking and item enrichment of Wikidata and the various Wikimedia projects:

Match new Wikiquote pages with Wikidata items and add the sitelink to Wikidata.
Match Wikidata items with new Wikiquote pages


Match new Wikipedia articles and categories with Wikidata items, and add the sitelink to Wikidata.


Match Commons categories with Wikidata items, and add the Commons sitelink to Wikidata.
Match Wikidata items with Commons Categories

Decide if a Wikipedia article and a Wikidata item describe the same entity (using data from the duplicity tool).
Match Wikidata items with new Wikipedia articles

See also

[edit]

For related Help pages, see:

  • Help:Items, which explains what items are and what rules they follow
  • Help:Merge, which explains what merges are and how to perform one
  • Help:Badges, which explains badges

For additional information and guidance, see:

  • Project chat, for discussing all and any aspects of Wikidata
  • Wikidata:Glossary, the glossary of terms used in this and other Help pages
  • Help:FAQ, frequently asked questions asked and answered by the Wikidata community
  • Help:Contents, the Help portal featuring all the documentation available for Wikidata