Manual:Interwiki/es

Los enlaces interwiki son enlaces a páginas de otros proyectos que utilizan un estilo de enlace interno con prefijo.

Los enlaces interwiki permiten enlazar a, por ejemplo, páginas de Wikipedia, Wikibooks, Wikinews, etc. o a su propio proyecto wiki en distintos idiomas (véase ).

Un enlace como  aparecerá así: Main Page y lo redirigirá a la página principal de Wikipedia.

Table and query API
Los enlaces interwiki se almacenan en la tabla de la base de datos de MediaWiki. La lista está disponible a partir de la propiedad «interwikimap» de la metaconsulta a la API, en otras palabras,

Default
Several Wikimedia projects (and others) are ready for interwiki linking by default, so you can use them without editing your database.

The following are some examples of interwiki prefixes which are available by default (Wikipedia is also available, 1.10 and after):

The full list of default interwiki prefixes is available at

See m:Help:Interwiki linking for complete information on linking from/to Wikimedia projects.

Adding a new website for interwiki linking
It is recommended to use the "Interwiki" extension, which eases the process.
 * Interwiki links are set in the  table of the database.
 * To modify these, you will need to edit the database, as below.

As Wikipedia isn't set up by default prior to version 1.10, you might want to add it (and other projects that you desire).

The examples below show how to set up  as a link to the English Wikipedia.

The idea is to insert a line of the form:

('prefix', 'URL format string', 1, 0)

into the  table.

Single line
Advanced users may use a single command line, as follows:


 * MySQL y PostgreSQL

Newer MediaWiki versions require some extra fields such as.

Exportar, añadir y volver a importar
Alternatively, you can use the following multi-step process, which exports the  table, adds a line, then re-imports it:

('w', 'https://en.wikipedia.org/wiki/$1', 1, 0);
 * Export the database table
 * add to the end of the table a line of the following form (using English wikipedia as an example):


 * Import the database table

To test
To test configuration:


 * Go to your site,
 * create an article, with the following content:
 * This should display a link to the 'Village pump' page on en.Wikipedia.org (the url )
 * This should display a link to the 'Village pump' page on en.Wikipedia.org (the url )

Field documentation
In detail, the fields of the  database table are as follows:


 *  : choose a prefix, which is used for interwiki linking, e.g. "wikipedia" for linking to Wikipedia.
 *  : enter the project's URL, e.g.  for Wikipedia. Don't forget the   as it is replaced with the article's name you are linking to (  links to  ).
 *  : enter the project's URL, e.g.  for Wikipedia. Don't forget the   as it is replaced with the article's name you are linking to (  links to  ).
 *  : if 1, your wiki will redirect even external links of the form iw_prefix:title, not only those from its own pages; you need this if you want to use the redirect functionality from outside your wiki or other wikis use your transwiki functions for nested transwiki links (like w:en:fr:Wikipédia:Accueil). See m:Help:Interwiki linking. Requires a protocol to be specified in.
 *  : "transwiki transclusion" - set to 1 if you want to use pages from the other wiki as templates. You will also need to set  in your LocalSettings.php. Requires a protocol to be specified in.
 *  : URL to the MediaWiki API, e.g.  (optional).
 *  : Database name of the wiki (If locally accessible). May be used (later?) for interwiki transclusions. (optional)

Enlaces interwiki a otros idiomas
If you have installed a, you can link from an article in English to an article in German (if you have a German project, too). You can set up MediaWiki to show those links in the sidebar, just below the toolbox.

In your filesystem, there is a subfolder of your MediaWiki installation, called "languages". Go there and have a look at " " as it contains a list of known languages and their prefixes. E.g. you want to add your German project, search " " for "Deutsch" and note the prefix "de".

If you know the "right" prefix, edit your database by adding a new line to table :
 *  : language-prefix (e.g. "de" for German), which is listed in " "
 *  : URL to your wiki-project (e.g. )
 *  : same as above "Adding More"
 *  : same as above "Adding More"

Now, you can link an article to the same in other languages. Adding  on your English Main_Page will create a link "Deutsch" below the toolbox, which leads to the Main_Page of the German wiki (Hauptseite).

Note, that this link is shown in Sidebar's section, only, and not inside of the article. If you want to create a link inside of the text, you have to add a colon previous to the prefix:  or set  to false.

Exportar la tabla interwiki desde un wiki
The following JavaScript code performs the API query to retrieve the interwiki map of an existing wiki, then displays the SQL INSERT statements to fill the interwiki table on a new wiki. You run it for example by injecting the code through your browser's developer tools, or by placing it inside Special:MyPage/skinname.js and previewing.

Véase también

 * (provides Special:Interwiki)
 * [//www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap Mapa interwiki de MediaWiki.org]
 * [//www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap Mapa interwiki de MediaWiki.org]
 * [//www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap Mapa interwiki de MediaWiki.org]
 * [//www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap Mapa interwiki de MediaWiki.org]
 * [//www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap Mapa interwiki de MediaWiki.org]