Guide to interwiki linking

From Miraheze Meta, Miraheze's central coordination wiki
Other languages:

An interwiki link is a unique link that takes users from one wiki to another. For instance, the Miraheze Commons' commons:main page is linked to by [[commons:main page|commons:main page]]. An interwiki map, which is a list of target wikis or websites together with their prefixes, is provided for each wiki. These target wikis or websites don't even have to be wikis or use MediaWiki.

Preface[edit | edit source]

Interwiki links are internal-style links to other websites (which do not have to be wikis, despite the name). For example, you can link to the article https://simple.wikipedia.org/wiki/Baby by typing [[simple:Baby]]. It will result in a link simple:Baby. This works because Miraheze Meta-Wiki configures simple: as an "interwiki prefix" that turns into https://simple.wikipedia.org/wiki when used inside Special:MyLanguage/. Interwiki links, in contrast to internal links, do not use page existence detection, so they will still display as blue links even if the page in question does not exist on the destination wiki.

You can build piped links, which are similar to internal page links but have a different link label, for example, [[:simple:Baby]] is the link Cute baby and [[:simple:Baby]] is the link simple:Baby.

Basically, interwiki links are abbreviations for commonly-used longer external links. A very similar link could be created as Cute baby.

Interlanguage links[edit | edit source]

If your wiki includes more language versions, you might find interlanguage links in the sidebar under the "in other languages" section just below the toolbox.

An interlanguage link functions similarly to a category link in terms of appearance in wiki markup, but it is displayed differently. Interlanguage links display in a special list in the page's sidebar (or elsewhere, depending on the wiki's settings and the skin being used), whereas category links often appear in a special list at the bottom of the page.

A page that can be used as a template (even if it is not in the template namespace) should not contain an interlanguage link since it shows in the page's edge and gives the impression that the link is to a translation of the referring page into the other language. Pages in the MediaWiki namespace are not appropriate for interlanguage links for the same reason.

The positions inside the wikitext are irrelevant, but the mutual order of interlanguage links is retained. They are typically placed toward the end. If they are in the section being edited when using section editing, they show up in the preview.

Even when using the project prefix, a link to the project itself (and hence a link to the page itself) shows in-page.

Why interlanguage links?[edit | edit source]

Interlanguage links connect pages on related subjects in several languages. The language prefix is the prefix supplied at your wiki for the other language version (typically the #Table of all possible two letter language codes). To establish an interlanguage link, type [[language prefix:page name|language prefix:page name]] anywhere on the page (ideally towards the bottom, like category links). The interlanguage link is one-way; the page in the other language does not point back to it. An comparable backlink must be added there as well for that reason.

Table of all possible two letter language codes[edit | edit source]

Decoding table of ISO 639-1 alpha-2 codes
aa ab ac ad ae af ag ah ai aj ak al am an ao ap aq ar as at au av aw ax ay az
ba bb bc bd be bf bg bh bi bj bk bl bm bn bo bp bq br bs bt bu bv bw bx by bz
ca cb cc cd ce cf cg ch ci cj ck cl cm cn co cp cq cr cs ct cu cv cw cx cy cz
da db dc dd de df dg dh di dj dk dl dm dn do dp dq dr ds dt du dv dw dx dy dz
ea eb ec ed ee ef eg eh ei ej ek el em en eo ep eq er es et eu ev ew ex ey ez
fa fb fc fd fe ff fg fh fi fj fk fl fm fn fo fp fq fr fs ft fu fv fw fx fy fz
ga gb gc gd ge gf gg gh gi gj gk gl gm gn go gp gq gr gs gt gu gv gw gx gy gz
ha hb hc hd he hf hg hh hi hj hk hl hm hn ho hp hq hr hs ht hu hv hw hx hy hz
ia ib ic id ie if ig ih ii ij ik il im id io ip iq ir is it iu iv he ix iy iz
ja jb jc jd je jf jg jh yi jj jk jl jm jn jo jp jq jr js jt ju jv jv jx jy jz
ka kb kc kd ke kf kg kh ki kj kk kl km kn ko kp kq kr ks kt ku kv kw kx ky kz
la lb lc ld le lf lg lh li lj lk ll lm ln lo lp lq lr ls lt lu lv lw lx ly lz
ma mb mc md me mf mg mh mi mj mk ml mm mn ro mp mq mr ms mt mu mv mw mx my mz
na nb nc nd ne nf ng nh ni nj nk nl nm nn no np nq nr ns nt nu nv nw nx ny nz
oa ob oc od oe of og oh oi oj ok ol om on oo op oq or os ot ou ov ow ox oy oz
pa pb pc pd pe pf pg ph pi pj pk pl pm pn po pp pq pr ps pt pu pv pw px py pz
qa qb qc qd qe qf qg qh qi qj qk ql qm qn qo qp qq qr qs qt qu qv qw qx qy qz
ra rb rc rd re rf rg rh ri rj rk rl rm rn ro rp rq rr rs rt ru rv rw rx ry rz
sa sb sc sd se sf sg sh si sj sk sl sm sn so sp sq sr ss st su sv sw sx sy sz
ta tb tc td te tf tg th ti tj tk tl tm tn to tp tq tr ts tt tu tv tw tx ty tz
ua ub uc ud ue uf ug uh ui uj uk ul um un uo up uq ur us ut uu uv uw ux uy uz
va vb vc vd ve vf vg vh vi vj vk vl vm vn vo vp vq vr vs vt vu vv vw vx vy vz
wa wb wc wd we wf wg wh wi wj wk wl wm wn wo wp wq wr ws wt wu wv ww wx wy wz
xa xb xc xd xe xf xg xh xi xj xk xl xm xn xo xp xq xr xs xt xu xv xw xx xy xz
ya yb yc yd ye yf yg yh yi yj yk yl ym yn yo yp yq yr ys yt yu yv yw yx yy yz
za zb zc zd ze zf zg zh zi zj zk zl zm zn zo zp zq zr zs zt zu zv zw zx zy zz
Colour legend
183/676
Officially assigned: assigned to a language
7/676
Deprecated: used previously but no longer assigned
486/676
Unassigned

Miraheze pseudo-interwiki links[edit | edit source]

In addition to the default set of interwiki prefixes available to all Miraheze wikis, there is a native interwiki syntax that allows users to link from any miraheze wiki to any other miraheze wiki without setting up custom prefixes.

This capability is known as Pseudo-Interwiki Linking

The syntax for such links is [[mh:<subdomain>:<pagename>|mh:<subdomain>:<pagename>]], and determining how to construct that link can be as simple as examining the URL for your destination page if a custom domain is not in use.

Examples[edit | edit source]

To target this wikipage Format IW link like this
https://bread.miraheze.com/wiki/Rye [[mh:bread:Rye|mh:bread:Rye]]
https://bread.miraheze.com/wiki/Category:Local_Bakeries [[mh:bread:Category:Local_Bakeries|mh:bread:Category:Local_Bakeries]]
https://bostonbakersguild.info/wiki/File:Walking_Tour.png [[mh:bbg:File:Walking_Tour.png|mh:bbg:File:Walking_Tour.png]]

In the last example, the Boston Baker's Guild wiki is using a custom domain, preventing easy identification of the subdomain we'll need.

For this hypothetical, one could navigate to the core settings page of that wiki, found at https://bostonbakersguild.info/wiki/Special:ManageWiki/core.

Upon reaching the page, we would see that the database name is logged as bbgwiki, meaning that the subdomain for linking to the wiki is bbg. With this knowledge, the rest of the link can be formed as normal, allowing interwiki linking.

NOTE: Examples given above are non-existent wikis. The Special:ManageWiki/core page is readable on all wikis for diagnostic purposes, though non-administrators will be unable to perform any changes on this page.

External links[edit | edit source]

  • [1] at the Library of Congress