Extension:WikipediaExtracts

The WikipediaExtracts extension allows you to insert content extracted directly from Wikipedia into any MediaWiki wiki. The content extracted comes in the form of limited wikitext, omitting leading templates, links to files or pages, etc., so it looks great on any wiki.

Tag
To insert the content of any Wikipedia article into any page, simply write: Title of the article If you omit the title, then the root title of the current page will be used. You can also use the link to the article: https://en.wikipedia.org/wiki/Title_of_the_article

You can control several aspects of the content you get from Wikipedia by passing parameters to the tag:
 * language - The language of the Wikipedia you query ("en", "es", "de", etc.) The default is the content language of your wiki.
 * chars - The number of characters you get. Cannot be used together with the "sentences" parameter.
 * sentences - The number of sentences you get. Cannot be used together with the "chars" parameter.
 * intro - Whether or not to get content only before the first section. Any value means true.
 * plaintext - Whether or not to get content as plain text rather than limited HTML. Any value means true.
 * sectionformat - Either "plain", "wiki" or "raw". Default is "wiki".

Most of these parameters are based on the API of the Extension:TextExtracts, check its documentation for more details.

Parser function
The parser function works pretty much like the tag. To get the content of any Wikipedia article into any page, just write: Again, if you omit the title, then the root title of the current page will be used, and you can also use the link to the article:

You can pass all the parameters described in the extension tag using the familiar template syntax:

The main reason to use the parser function instead of the tag is because it can be combined with magic words and templates.