WIT/Resources/Wiktionary-missing Wikidata sitelinks

From Meta, a Wikimedia project coordination wiki

Wiktionary, sitelinks and Cognate[edit]

Of the 170+ Wiktionaries currently online, 112 of them have their main page in the main namespace, or mainspace, rather than the project namespace, “Wiktionary:”.

Before Wikidata became part of the Wikimedia family in 2012, every Wikipedia (or other Wikimedia project) had to manually link their articles to those in other languages. Because of the immense size and number of Wikimedia projects, language versions, and articles contained in them, this quickly becomes unwieldy and prone to incompleteness.

Enter Wikidata sitelinks[edit]

By replacing the old manual interlanguage links with sitelinks, Wikidata becomes a central hub for storing links from different language versions of an article. Each article links to its corresponding Wikidata item about that concept and by doing so, automatically connects it to all the other language Wikipedias with articles also connected to the Wikidata item. The maintenance of these links is greatly simplified by this method, as it eliminates the repetitive manual task of adding interlanguage links, and updates any changes (such as adding new languages).

Wiktionary is a special case[edit]

Wiktionary, the dictionary of the world, aims to provide dictionary entries of all words in all languages. In the English Wiktionary, you can find the description of the English word ‘north’, and also the description of the French word ‘nord’, the Hebrew word ‘צפֿו’ and any other language version of the word ‘North’ that the Wiktionary community has added.

Linking articles to other language Wiktionaries is different to the other Wikimedia projects, as you want to link to the same word in the other language Wiktionary and not the local translation.

For example, the English Wiktionary article on the word ‘north’ will be linked to the French Wiktionary article for the (English) word ‘north’ and similarly, the French Wiktionary article for the word ‘sud’ should link to the English Wiktionary article for the (French) word ‘sud’.

Wiktionary sitelinks should link to an identical page title in other languages, however Wikidata sitelinks are intended to link to the language-specific version of the page title. A solution was needed to resolve this.

To serve this need, the Wikidata team developed the Cognate extension. Extension: Cognate is a replacement for Wikidata sitelinks exclusively for the Wiktionary mainspace. The mainspace, often also called the article space, are the subset of pages on the Wikimedia projects that are dedicated to hosting article content. A mainspace page does not contain a prefix (such as Template:, Help:, Special:) and is where the majority of Wikimedia content is created and stored.

Wiktionary's 'main page': Where to put it?[edit]

Every language version of every Wikimedia project has a Main Page. It acts as the homepage for the project and will often be the first page many visitors see. By using Wikidata sitelinks, the main pages can be linked together, enhancing accessibility and navigation for multilingual readers. If the main page is present in the main space, Cognate will be active and will only link to other main pages that precisely match the page title. As the Wikimedia movement encourages providing content in any and every language, ‘main page’ will often be locally translated in other language Wiktionaries and Cognate will not link them together.

Many Wiktionaries have moved their main page to the Project namespace to avoid this. By moving the main page out of the mainspace, Cognate will no longer be active and the Wikidata sitelinks can connect the main page to the other 169 language versions of Wiktionary (that are also sitelinked to the Wikidata item).

Is this necessary?[edit]

No, it isn't. We do think it would be beneficial and increase the connectivity of that Wiktionary to all others, but ultimately the decision of where the main page is placed is for the Wiktionary communities to decide for themselves. We can also offer guidance and even help facilitate moving the main page for the Wiktionary community, if they agree.


You can see the previous discussions on this topic in the following places:

Move the Main Page into a project name space[edit]

(Global sysop, local sysop or interface admin rights are required to complete this process)
The following steps have been documented and followed by User:Ahmad252 as they moved the Main Page of the Persian Wiktionary into the Project namespace.

1. Go to your local Wiktionary, the one where you wish to make changes / move the Main page.

2. Use the search bar to navigate to the page: MediaWiki:Mainpage-title

3. Open the source editor, and blank the page (remove everything) if you don't want a title to be shown on the main page. If you want a title to be shown, you can enter the translation of "Main Page" into your language.

4. Repeat the process on the page MediaWiki:Mainpage-title-loggedin.

5. (optional) If your Wiktionary main page already has links to all other languages (i.e. if it is not using the magic word {{noexternallanglinks}}), you don't need to do this step. If it is using that magic word, you should do this step.

Next, please search for the MediaWiki:Common.js and open the page's source editor, scroll to the bottom of the page and copy/paste the following code into the page:

/* ==Page specific extensions== */
/* ===[[Wiktionary:Main Page]]=== */
mw.loader.using( 'mediawiki.util', function() {	
	if ( mw.config.get( 'wgIsMainPage' ) ) {
		mw.util.addPortletLink( 'p-lang', '//meta.wikimedia.org/wiki/Wiktionary#List_of_Wiktionaries',
				'Complete list', 'interwiki-completelist', 'Complete list of Wiktionaries' );
	}
} );

Note: It is preferable to translate the following elements of the code above into the local Wiktionary language:

  • 'Complete list'
  • 'Complete list of Wiktionaries'

6. Now it is time to move the main page to the project namespace.

  • Please make sure a redirect is left behind
  • And also check the page gets moved in the connected Wikidata item, Q5296. If not, please change its name in that item manually.

7. Please navigate to the page: MediaWiki:Mainpage by searching for it. The content to enter in this page should only be the locally translated version of: Wiktionary:Main Page

Here are a few examples:

  • (German) Wiktionary:Hauptseite
  • (Finnish) Wikisanakirja:Etusivu
  • (Kazakh) Уикисөздік:Басты бет
  • (Urdu) ویکی لغت:صفحۂ اول

You can find the translated content in column 3 of the table found here:
List of localised Wiktionary Main Pages

8. With the main page now moved into the project namespace, whenever anyone now navigates to the Wiktionary, the URL should appear like the following examples:

 English Wiktionary: en.wiktionary.org/wiki/Wiktionary:Main_page
 German Wiktionary: de.wiktionary.org/wiki/Wiktionary:Hauptseite
 Kazakh Wiktionary: kk.wiktionary.org/wiki/Уикисөздік:Басты_бет
 Urdu Wiktionary: ur.wiktionary.org/wiki/ویکی_لغت:صفحۂ_اول


Explore Further