Jump to navigation Jump to search
This page is a translated version of the page Extension:Interwiki and the translation is 5% complete.
Other languages:
Bahasa Indonesia • ‎Deutsch • ‎English • ‎Türkçe • ‎français • ‎polski • ‎português • ‎português do Brasil • ‎svenska • ‎سنڌي • ‎中文 • ‎日本語 • ‎한국어
Ekstensi ini tersedia di MediaWiki 1.21 dan selanjutnya. Jadi Anda tidak perlu mengunduhnya lagi. Akan tetapi, Anda masih perlu mengikuti instruksi lain yang diberikan.
Manual ekstensi MediaWiki
OOjs UI icon advanced.svg
Status rilis: stabil
MediaWiki extension Interwiki.png
Implementasi Halaman istimewa
Deskripsi Adds a special page to view and manipulate the interwiki table
Perancang awal Stephanie Amanda Stevens, SPQRobin
Versi terbaru 3.1 (2018-06-07)
MediaWiki 1.28+
Perubahan basis data Tidak
Lisensi Lisensi Publik Umum GNU 2.0 atau lebih baru
Contoh See Extension:Interwiki/Sites using this extension
  • $wgInterwikiViewOnly
  • InterwikiCentralDB
Terjemahkan ekstensi Interwiki jika tersedia di

Periksa matriks penggunaan dan versi.

Masalah Tugas terbuka · Laporkan kekutu

The Interwiki extension adds the "Special:Interwiki" page to MediaWiki , to view and edit the interwiki table, and a log of any actions made with it.

Since Interwiki version 2.1, it works with the $wgInterwikiCache , and the CSS uses ResourceLoader .

The list of "Special:Interwiki" is identical to the API action=query&meta =siteinfo&siprop=interwikimap, except the iw_api field is not available.

Ekstensi ini bisa diperoleh secara langsung dari Git. [?]:

  • Telusuri kode
  • Beberapa ekstensi memiliki tag untuk rilis stabil.
  • Setiap cabang bersesuaian dengan sebuah rilis MediaWiki. Terdapat pula cabang "master" yang berisi versi alfa terbaru (mungkin membutuhkan versi alfa MediaWiki).

Ekstrak snapshot-nya dan letakkan di direktori extensions/Interwiki/ instalasi MediaWiki Anda.

Jika Anda mengenal git dan punya akses shell ke peladen Anda, Anda juga bisa memperoleh ekstensinya dengan cara berikut:

cd extensions/
git clone


  • Unduh dan letakkan berkas-berkasnya di dalam sebuah direktori yang bernama Interwiki di folder extensions/ Anda.
  • Tambahkan baris berikut di bawah LocalSettings.php Anda:
    wfLoadExtension( 'Interwiki' );
    // To grant sysops permissions to edit interwiki data
    $wgGroupPermissions['sysop']['interwiki'] = true;
    // To create a new user group that may edit interwiki data
    // (bureaucrats can add users to this group)
    # $wgGroupPermissions['developer']['interwiki'] = true; // delete the comment indicator # as appropriate
  • Yes Selesai – Telusuri ke Special:Version di wiki Anda untuk memastikan ekstensinya berhasil dipasang.

Bagi pengguna yang menjalankan MediaWiki 1.24 atau lebih lama:

Instruksi di atas menjelaskan cara baru untuk memasang ekstensi ini menggunakan wfLoadExtension(). Jika Anda perlu memasang ekstensi ini di versi yang lebih lama (MediaWiki 1.24 dan sebelumnya), bukannya wfLoadExtension( 'Interwiki' );, Anda perlu menggunakan:

require_once "$IP/extensions/Interwiki/Interwiki.php";
  • The configuration that comes with MediaWiki will not grant permission to any user group.
Thus, you will need to add the configuration yourself or no one will be able to edit interwikis.
  • To disable adding prefixes through the Special:Interwiki interface, set $wgInterwikiViewOnly to true.
This extension's entry in the list of Special pages is not the name of the extension. The entry in the list is defined by the interwiki message item defined per locale in SpecialInterwiki.i18n.php. Its value is Lihat dan sunting data interwiki.

Setting up interlanguage links

To set up interlanguage links using this extension, make sure that $wgInterwikiMagic is set to true and $wgHideInterlanguageLinks is set to false (they are like this by default, you don't need to change them usually). Then go to Special:Interwiki as a user with the appropriate permissions. For example, if the French version of your wiki was located at http://fr.foowiki.tld/wiki/, you could add http://fr.foowiki.tld/wiki/$1 to the interwiki table with values trans 0 and local 0. Then the interlanguage link to the French version would work, but a #REDIRECT to a French-language page from a page in some other language would be refused.

See Manual:Interwiki table for a full explanation of the forward (iw_local) and transclude (iw_trans) bits.

In brief:

  • Enabling forwarding ('local' true) is normally done between all languages and projects in the same group, as it allows a link to any one of the languages to be used as a gateway to the others. The English-language Wikipedia, for instance, sets the 'local' bit true for all of the other-language Wikipedias and for projects like commons:, wikinews: or wikivoyage:. A user on a wiki outside Wikipedia where the wikipedia: interwiki prefix points to could create a link like wikipedia:fr:Encyclopédie. That link goes initially to "fr:Encyclopédie" on the English-language Wikipedia. The en.wikipedia server immediately recognises fr: as a 'local' interwiki link, so replies with a redirect to la Wikipédia whereédie displays the requested French-language Wikipédia page [[Encyclopédie]] et voilà.
  • Enabling transclusion is rarely done, as it allows an article on one wiki to use templates from some other wiki. This is referred to as 'scary transclusion' as it will cause problems if the other wiki changes the template unexpectedly. A few wiki farms use this to create one 'central wiki' with various templates which are made available to other wikis in the same farm. If you don't need this, don't enable it.

Global interwikis

Since version 3, Interwiki supports defining a global/central database and pulling defined interwikis from there as well as from the local table. This functions essentially as a table merge, with local interwiki definitions overriding central. Language links are not pulled from the central table; these are set up as local-only due to a central table likely serving more than one project (with each having its own languages).

The central table is the interwiki table of the central wiki. This means that as far as the central wiki is concerned, it is basically just a normal non-global setup. There are therefore no special rights associated with the central (global) table, though it is likely you may want to be more picky about how you assign the 'interwiki' edit right on this wiki.

  • This was decided by looking at current possible use cases (ShoutWiki's hub, Uncyclomedia's central wiki, and Meta-Wiki) where the central wiki isn't going to have anything extra anyway.
  • This might change in the future, but anything more intelligent will require schema updates.
  • This probably doesn't work with table prefixes because of how the table is accessed.

To set up a central interwiki table, simply provide the name of the database of the wiki you want to use:

// To enable pulling global interwikis from a central database
$wgInterwikiCentralDB = 'mw_central';

Replace 'mw_central' with the name of the database.

For those using table prefixes here is an alternative solution for "pool_example_wiki" tables.

$wgSharedDB = 'example_wiki'; # The $wgDBname for the wiki database holding the main interwiki table
$wgSharedPrefix = 'pool_'; # The $wgDBprefix for the database. Defaults to the prefix of the current wiki if not specified
$wgSharedTables = ['interwiki'];

Protocol-relative URLs

MediaWiki supports protocol-relative URLs (PRURLs), from MediaWiki 1.18+. With a PRURL, a user accessing a page over http or https uses the same scheme to access the interwiki link. To use a PRURL, first ensure the destination server supports HTTPS; if it does, then simply remove the http: portion of the URL in the link table. For example, change$1