Diferencia entre revisiones de «Ayuda:Enlace interwiki»

De Wikiversidad
Contenido eliminado Contenido añadido
Echani (discusión | contribs.)
Echani (discusión | contribs.)
Línea 168: Línea 168:
==Enlaces a otros idiomas==
==Enlaces a otros idiomas==


Para el caso de proyectos multilingües, con un proyecto paralelo por cada idioma, se utiliza un sistema de enlaces interlingüísticos. Cada página del proyecto muestra una lista en el panel lateral, en la sección de otros idiomas, con enlaces a las páginas equivalentes en otros idiomas. Normalmente solo es necesario especificar manualmente una página en un idioma alternativo, ya que los [[w:Wikipeida:Bots|bots]] se encargan de completar la lista automáticamente, siempre y cuando se especifique al menos uno.
Para el caso de proyectos multilingües, con un proyecto paralelo por cada idioma, se utiliza un sistema de enlaces interlingüísticos. Cada página del proyecto muestra una lista en el panel lateral, en la sección de otros idiomas, con enlaces a las páginas equivalentes en otros idiomas. Normalmente solo es necesario especificar manualmente una página en un idioma alternativo, ya que los [[w:Wikipedia:Bots|Bot]] se encargan de completar la lista automáticamente, siempre y cuando se especifique al menos uno.


Los enlaces entre lenguas también pueden utilizarse para conectar las descripciones en diferentes idiomas de una misma imagen.
===Sintaxis===

===Sintáxis básica===


Los enlaces interlingüísticos tienen la siguiente forma:
Los enlaces interlingüísticos tienen la siguiente forma:
Línea 182: Línea 184:
No se debe incluir un enlace hacia la página de la lengua que está escribiendo.
No se debe incluir un enlace hacia la página de la lengua que está escribiendo.


===Sintáxis avanzada===
===Utilidad de los enlaces interlingüísticos===


*Cuando una página esté previsto que se use como [[w:Ayuda:Plantillas|plantilla]] (incluso si no está en el espacio de nombres ''Plantillas:''), los interwikis deben colocarse entre las etiquetas <tt>&lt;noinclude&gt;</tt> y <tt>&lt;/noinclude&gt;</tt>. Así se evita que los interwikis se añadan a la página en la que es insertada la plantilla. Por ejemplo <tt>&lt;noinclude&gt;[&#91;en:interwiki linking&#93;]&lt;/noinclude&gt;</tt>.
Los enlaces interlingüísticos se emplean para enlazar páginas equivalentes en diferenetes idiomas.
Thus, interlanguage link is mainly suitable for linking to the ''corresponding'' page in another language. It is not suitable for multiple links of the same other language. See '''[[Interlanguage use case]]''' for a discussion of common troubles with this system and other possible implementations.

The feature can also be used on an image description page to link to the same or a similar image in a sister project. Other interwiki links to images require the prefixed colon.

Note that, if a page may be used as a [[Help:template|template]] (even if it is not in the template namespace), it should note its interlanguage links between <tt>&lt;noinclude&gt;</tt> and <tt>&lt;/noinclude&gt;</tt>. This is the same idea as for [[Help:Category|categories]]. Comparison:
# <tt>[&#91;:en:link&#93;]</tt> or <tt>[&#91;:category:name&#93;]</tt> are ordinary links.
# <tt>[&#91;m:en:link&#93;]</tt> or <tt>[&#91;m:category:name&#93;]</tt> are Interwiki links, see above.
# <tt>[&#91;category:name&#93;]</tt> without leading colon adds a category to the page.<br /><tt>[&#91;en:link&#93;]</tt> without leading colon adds an interlanguage link to the page.
# <tt>&lt;noinclude&gt;[&#91;category:name&#93;]&lt;/noinclude&gt;</tt> limited to actual page.<br /><tt>&lt;noinclude&gt;[&#91;en:link&#93;]&lt;/noinclude&gt;</tt> ditto limited to actual page.

For projects like [[m:|Meta]] a missing leading colon has no effect, Meta doesn't support Interlanguage links. For [[w:|Wikipedia]] and similar projects it's a major difference.


The mutual order of interlanguage links is preserved, but otherwise the positions within the wikitext are immaterial, again the same rule as for categories. Usually they
The mutual order of interlanguage links is preserved, but otherwise the positions within the wikitext are immaterial, again the same rule as for categories. Usually they
are put at the end. With section editing they appear in the preview if they are in the section being edited.
are put at the end. With section editing they appear in the preview if they are in the section being edited.



A link to the project itself (hence also a link to the page itself), even if referred to with the project prefix, appears in-page.


Suppose that we have pages [[:de:Zug]], [[:en:Train]], [[:fr:Train]] then we need:
Suppose that we have pages [[:de:Zug]], [[:en:Train]], [[:fr:Train]] then we need:
Línea 212: Línea 203:
*[[Template:About]].
*[[Template:About]].


===In-page interlanguage links===
To make an interlanguage link in-page, prefix a colon (e.g. <nowiki>[[:en:wiki|wiki]]</nowiki>). This can e.g. be useful to link to a page in another language if no local version is available. See also some example templates for conveniently making such links:


*Para que un enlace entre idiomas aparezca en el propio cuerpo de la página, se le debe colocar el símbolo '''<code>":"</code>''' al principio: por ejemplo <code><nowiki>[[:en:wiki]]</nowiki></code>. Puede ser útil para enlazar una página en otro idioma cuando no existe una versión local.
*{{tiw|en|nli}} - <nowiki>[[:nl:{{{1}}}]] (in [[Dutch language|Dutch]])</nowiki>
*{{tiw|en|nlil}} - <nowiki>[[{{{1}}}]] ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>
*{{tiw|en|nlii}} - <nowiki>''[[{{{1}}}]]'' ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>
*{{tiw|en|nlis}} - <nowiki>([[:nl:{{{1|{{PAGENAME}}}}}|nl]])</nowiki>
*{{tiw|en|nlinl}} - <nowiki>{{{1}}} ([[:nl:{{{2|{{{1}}}}}}|nl]])</nowiki>


*El texto que se muestra por defecto es el nombre del idioma. No se puede modificar (con la sintáxis <code><nowiki>[[a|b]]</nowiki></code>) a no ser que se convierta previamente en un enlace en el texto por medio de '''<code>":"</code>'''. Por ejemplo: <code><nowiki>[[:en:wiki|wiki]]</nowiki></code>.
===Interlanguage link in the wider sense===


*Un enlace al mismo proyecto (es decir, a la misma página), aparece en el cuerpo del texto incluso aunque se especifique el prefijo del proyecto. Por ejemplo <code><nowiki>[[es:Ayuda:Enlace_interwiki]]</nowiki></code> se muestra [[es:Ayuda:Enlace_interwiki]].
An interlanguage link in the wider sense includes a link to a corresponding page in another language which, for the software, is a regular link, as opposed to one employing the special interlanguage link ''feeature'' as described above. This can also be an internal link on a multilingual project, e.g. on Meta:


*Un enlace a otro idioma puede enlazar directamente a una sección del artículo de destino, por ejemplo: <code><nowiki>[[en:Help:Interwiki linking#See also]]</nowiki></code>.
*[[Meta:Interlanguage links]]


*En proyectos no multilingües, el funcionamiento es ligeramente diferente:
Possible reasons for using an "interlanguage link" in the page body include:
**en '''commons''', un enlace interlingüístico en ''commons'' enlazará a la versión en dicho idioma de [[w:|wikipedia]].
*control over position
** '''meta''' utiliza otro método basado en URL para los diferentes idiomas, por ejemplo véase http://meta.wikimedia.org/wiki/Meta:Es/Enlaces_entre_lenguas
*control over label
*the target contains an anchor


==Véase también==
==Véase también==

Revisión del 08:45 29 oct 2006

Plantilla:Por traducir

Texto original en inglés


Un enlace interwiki es un enlace corriente del tipo [[enlace]] que, por medio de un prefijo, permite enlazar páginas en otros idiomas, de otros proyectos, e incluso de otros sitios web.

Por ejemplo, el enlace [[Portada]] conduciría a la portada de la wikiversidad. Sin embargo [[w:Portada]] conduciría a la portada de la wikipedia y [[en:Main Page]] enlazaría a la portada de la wikiversidad en inglés.


By adding a prefix to another project, internal link style ("prefixed internal link style") can be used to link to a page of another project. For example, [[wikipedia:InterWiki]] links to the InterWiki article on the English Wikipedia. This is called interwiki. For each project, an interwiki map (a list of target projects with their prefixes) is specified (example). These target projects need not use MediaWiki and need not even be a wiki.

A project's own namespace prefix cannot be reused as code for an external project. However, the prefix used for a target project may coincide with the prefix for a project namespace within that project. As a result, to link to a page in that namespace, use the same prefix twice, e.g. .

For portability across projects, one may want to select a link code that leads to the same target from all projects, e.g. MetaWikipedia:wikibooks:Main Page. The "superfluous" "MetaWikipedia:" prevents "wikibooks:" being interpreted as namespace prefix when the code is used at wikibooks itself, while at Meta the "MetaWikipedia:" is ignored (it is not a namespace prefix, and even at Meta itself it is recognized as code for Meta). The codes above work from all projects. However, the existence detection and the self-link feature do not work on interwiki links.

Interwikis entre proyectos de WikiMedia

La fundación Wikimedia mantiene diversos proyectos que pueden ser enlazados entre sí y que se listan a continuación:

Prefijo Ejemplo Abreviatura
[[wikibooks:]] wikibooks: [[b:]] b:
[[meta:]] meta: [[m:]] m:
http://www.mediawiki.org/ [[mw:]] mw:
[[wikinews:]] wikinews: [[n:]] n:
[[wikiquote:]] wikiquote: [[q:]] q:
[[wikisource:]] wikisource: [[s:]] s:
[[wikipedia:]] Wikipedia: [[w:]] w:
[[wiktionary:]] wiktionary: [[wikt:]] wikt:
[[commons:]] commons:
[[foundation:]] foundation: same as wikimedia:
[[google:]] google: used for google queries
[[mediazilla:]] mediazilla: used with bug numbers
[[sep11:]] sep11:
[[wikimedia:]] wikimedia:
[[wikispecies:]] wikispecies:
[[incubator:]] incubator:

La versión larga no funciona para enlazar páginas de un mismo proyecto. La forma abreviada funciona en todo caso.


The interlanguage link feature works on Commons, and produces links to the Wikipedias. This is not reciprocal: a link from a Wikipedia to Commons is an in-page link.

The Interwiki map on Meta lists many prefixes, among others [[wikipedia:]] wikipedia: for the English Wikipedia working from any Wiki supporting the Meta Interwiki map, not only from MediaWiki Wikis. Some prefixes work only with a page, e.g. wikipediawikipedia: (fails) vs. wikipediawikipedia:Interwikimedia link (works). These prefixes are case insensitive.

Prefixes

Interwiki links can use prefixes for the project and/or for the language. Without prefix links are local, for pages in the same project and the same language. If only a language is given they go to a page in the same (or similar) project for the specified language:

[[:fr:]] fr:
[[:os:]] os:

If only the project is specified they typically go to the language of the source, see above. At most two prefixes are needed for pages in any existing project and any supported language:

[[s:de:Hauptseite]] s:de:Hauptseite
[[b:en:Main page]]  b:en:Main page

In the case of more than one prefix a page name has to be specified. For example, while w: and en: from Meta lead to the English Wikipedia's main page, a bare [[w:en:]] does not work: w:en:. If the language is different specifying it before the project can also work:

[[:de:q:Hauptseite]] de:q:Hauptseite
[[:en:n:Main page]]  en:n:Main page
[[n:en:Main page]]   n:en:Main page

The second example doesn't work from English Wikipedia w:en: pages, a project prefix before the language is better. More than two prefixes are generally unnecessary. The following examples should work everywhere:

[[m:Help:Help]] m:Help:Help
[[w:Interwiki]] w:Interwiki

Two prefixes can have unexpected effects, e.g. from Meta the following links end up on different pages:

[[m:en:About]]  m:en:About
[[:en:m:About]] en:m:About
[[m:About]]     m:About

In the first case Meta ignores the m:, because it's local, and then interprets en: as w:en: prefix for the English Wikipedia. In the second case the leading en: goes to the English Wikipedia, where the following m: goes straight back to Meta. The second example doesn't work at all from English Wikipedia w:en: pages, only the third example works everywhere.

In other words multiple prefixes are evaluated left to right by the relevant Wikimedia servers (project and language). For projects without different languages like Meta (because Meta is multilingual by itself) language prefixes can be handled as shorthands for w: plus the specified language:

[[:pl:2006]]   pl:2006
[[w:pl:2006]]  w:pl:2006
[[:pl:w:2006]] pl:w:2006

From Meta the first two links both arrive at the Polish 2006 page. The third arrives at the English Wikipedia, because that's how the server selected by :pl: interprets the second prefix w:.

For a portable link on that server it would be a bad idea to use w:, but :pl: does the trick. To test that effect from Meta the following links should go to the same page:

[[:ja:2006]]    ja:2006
[[:ja:ja:2006]] ja:ja:2006

Wikia

In Wikia, the prefix is the internal project name for some older wikis. For others, "Wikia:c:" is added in front (e.g. [[Wikia:c:sydney]] or shorter [[w:c:trains:locomotive]]).

From Wikimedia projects use [[wikiasite:sydney]] giving wikiasite:sydney, [[wikia:trains:locomotive]] giving wikia:trains:locomotive, or, for the central Wikia, wikicities:List of Wikia.

Enlaces a otros idiomas

Para el caso de proyectos multilingües, con un proyecto paralelo por cada idioma, se utiliza un sistema de enlaces interlingüísticos. Cada página del proyecto muestra una lista en el panel lateral, en la sección de otros idiomas, con enlaces a las páginas equivalentes en otros idiomas. Normalmente solo es necesario especificar manualmente una página en un idioma alternativo, ya que los Bot se encargan de completar la lista automáticamente, siempre y cuando se especifique al menos uno.

Los enlaces entre lenguas también pueden utilizarse para conectar las descripciones en diferentes idiomas de una misma imagen.

Sintáxis básica

Los enlaces interlingüísticos tienen la siguiente forma:

[[Código de lengua:Título]]

donde el código de lengua es un código de 2 letras de acuerdo con el estándar internacional ISO 693 (véase la lista completa). El español es "es", el inglés es "en", alemán es "de", etc). Se emplean códigos de idomas, no códigos de paises.

Estos enlaces son tratados de forma especial, ya que no se muestran en el cuerpo del artículo, sino en una cabecera especial denominada "Otros idiomas:" listadas por orden alfabético del nombre de las lenguas. Pueden situarse en cualquier parte del artículo original, aunque lo más recomendable y la práctica habitual es colocarlas al final de la página. Colocarlas al principio es problemático - ya que es confuso para los editores novatos y a veces se muestran en los resultados de búsqueda donde se desearía ver el cuerpo del artículo. Por esta razón, se recomienda poner los enlaces lingüísticos en el fondo de la página, debajo de las secciones de "véase también" y "enlaces externos". El emplazamiento no altera de ningún modo la apariencia visual de los enlaces en la página renderizada; se listan tanto encima como debajo del artículo.

No se debe incluir un enlace hacia la página de la lengua que está escribiendo.

Sintáxis avanzada

  • Cuando una página esté previsto que se use como plantilla (incluso si no está en el espacio de nombres Plantillas:), los interwikis deben colocarse entre las etiquetas <noinclude> y </noinclude>. Así se evita que los interwikis se añadan a la página en la que es insertada la plantilla. Por ejemplo <noinclude>[[en:interwiki linking]]</noinclude>.

The mutual order of interlanguage links is preserved, but otherwise the positions within the wikitext are immaterial, again the same rule as for categories. Usually they are put at the end. With section editing they appear in the preview if they are in the section being edited.


Suppose that we have pages de:Zug, en:Train, fr:Train then we need:

Thus there is not the possibility of simply copying each list, let alone of using a template, as can be done if different languages share one project, with or without separate namespaces, see e.g.:


  • Para que un enlace entre idiomas aparezca en el propio cuerpo de la página, se le debe colocar el símbolo ":" al principio: por ejemplo [[:en:wiki]]. Puede ser útil para enlazar una página en otro idioma cuando no existe una versión local.
  • El texto que se muestra por defecto es el nombre del idioma. No se puede modificar (con la sintáxis [[a|b]]) a no ser que se convierta previamente en un enlace en el texto por medio de ":". Por ejemplo: [[:en:wiki|wiki]].
  • Un enlace al mismo proyecto (es decir, a la misma página), aparece en el cuerpo del texto incluso aunque se especifique el prefijo del proyecto. Por ejemplo [[es:Ayuda:Enlace_interwiki]] se muestra es:Ayuda:Enlace_interwiki.
  • Un enlace a otro idioma puede enlazar directamente a una sección del artículo de destino, por ejemplo: [[en:Help:Interwiki linking#See also]].

Véase también