David Przybilla
David Przybilla

Reputation: 828

Wikipedia XML Dump, where to get translations for disambiguation directives?

In the Wikipedia XML dump articles which are disambiguation include the directive {{disambiguation}} somewhere within their content.

This is straightforward for the English wikipedia. However this directive changes across languages, for example in the Spanish wikipedia an article would contain {{desambiguación}}.

I tried querying the wikipedia metadata API. Specifically the one for magicwords:

https://es.wikipedia.org/w/api.php?action=query&meta=siteinfo&siprop=magicwords&format=json

The list returned include things like : __DISAMBIGUACION__ and __DISAMBIG__ but those do not seem to appear in the XML dump. And disambiguacion is certainly not in that list.

Any hints? is there any endpoint or list from where I can get this directive for other languages such as German, Italian.. and so on.

Upvotes: 1

Views: 280

Answers (1)

Termininja
Termininja

Reputation: 7036

The directive {{disambiguation}} is Wikimedia Template which is used to mark some page as a disambiguation page in the English Wikipedia. This template uses within itself the magic word __DISAMBIG__ and is connected with the other wikis templates by Wikidata Item (Q6148868). You can access this item by MediaWiki API:

https://www.wikidata.org/w/api.php?action=wbgetentities&ids=Q6148868&props=sitelinks

From the result you can see that template for:

  • eswiki is desambiguación
  • dewiki is begriffsklärung
  • itwiki is disambigua
  • ruwiki is неоднозначность
  • fawiki is ابهام‌زدایی
  • etc...

Upvotes: 2

Related Questions