Manual talk:Guide to setting up interwiki linking

What is the point of Interwiki links?
Interwiki linking is a function that allows a wiki administrator to create a specific wiki namespace for a set of wiki's. AKA. a wiki farm or family

For a good example, see Manual:Wiki family

Whats the meaning of the database fields
Especially of the field iw_local and the new iw_trans? I don't feel comfortable with turning knobs I don't know. Thanks, Herbert

Interwiki Map Scripting
On many interwiki maps, there is a statement,
 * "A script copies the list below into the database fairly regularly. Please do not change the format of this table, as the script depends on the format in order to update the database."

This script seems very useful. Is it open source? Where can I find it or the information I need to create my own? -GoodSignal 23:43, 30 December 2006 (UTC)

Lack of affirmitive response is not a bug
Text in this page states


 * THIS DOES NOT REPORT SUCCESS when it works... there is a bug in the mysql database program... no feedback is a bug...

This behavior may not be what this particular author wishes, but it is certainly not a bug. This is the designed user interface behaviour of UNIX programs. I'd like to see that text removed or changed. I didn't just do it because I expected that would just cause a war. Been there and done that.

Adding interwiki language links to special pages
I'm wondering how to add the interwiki language links to the special pages, like it is done here: w:de:Spezial:Recentchanges

Could someone explain that?


 * Okay, found it out on my own. Just add the interwiki language link to MediaWiki:recentchangestext in your wiki.

dynamic Sidebars showing Different Languages
I am wondering how you go about having the sidebar come up in different languages as users pick a page that has been translated into their language. My pages are coming up the same way as the MediaWiki.org Site, that is pagename/language.code. I have tried creating a MediaWiki:sidebar file with the language code extension (MediaWiki:Sidebar/language.code) hoping that would come up when the document was selected in the appropriate language.

I am not a technical person - can anyone help.

bugzilla links unclear
The section on bugzilla links is unclear, and doesn't seem to be implemented on this site, e.g. mozbug:315637

Please give an example of how it should work for users, with a disclaimer "Such bug links are not implemented on meta-wiki".

wiki.mozilla.org doesn't seem to implement this cool feature either :-)


 * See Help:Interwiki_linking.--Patrick 10:10, 6 January 2006 (UTC)


 * Yes, http://wiki.mozilla.org doesn't implement the mozbug InterWiki link. I've suggested it do this (bug 322603).  Instead, it has a  template, use that instead. -- skierpage 22:07, 19 September 2006 (UTC)

Spaces are converted
My Interwiki-Link needs a Space in it's URL, but the Parameter $1 is converted to the underline. Even if I write mywiki:one%20two I receive one_two. --Maletin 12:59, 6 April 2006 (UTC)
 * Does anyone have a solution for this? On my site, I'd like to set up an interwiki link to easily create links to Google Maps for addresses, using in the format, but I can't figure out how to keep it from going to  , which obviously doesn't work. I tried making a template called  , so I could pass the address through as a parameter, but it then my link shows up as Main St, Chicago, IL because the space after the 123 is assumed to indicate the link's label. Any help would be appreciated! --Jonathan Kovaciny 23:01, 11 December 2006 (UTC)

Is there a way that interwiki links can contain the #-sign? e.g. in http://any.server.com/side.shtml#parameter1=4&parameter3=3? Currently this link results in http://any.server.com/side.shtml#parameter1.3D4.26parameter3.3D3, but I want to preserve the URL unchanged. --Sankyo 16:17, 13 February 2007 (UTC)

Initial interwiki table population
After installing wikimedia 1.6.7 I had some initial difficulties getting interwiki linking working. Actually, it turns out it was working, but just not for the examples I was trying.

There were 174 entries in the interwiki table, but notably absent were 'w' and 'm', or their longer forms, which are used in many examples in the documentation. But those examples did not work for me.

I suggest that a new installation should populate the interwiki database table with only a small number of initial entries, to serve as examples of the table format and to make the examples in the documentation work correctly. Why is arXiv there by default but Wictionary is not? The list should fit on one page when you list the database table, so that one can see that it is a small list to which one can add, but one won't assume that everything is already there. In the least Meta and Wikimedia and Wictionary should be there. What other select few?

The present page layout does not explain very well that you need to run the maintenence script to get more interwiki's.  The example of how to add entries 'by hand' should come afterwards. Another way to do it would be to edit a custom file based on interwiki.sql or wiktionary-interwiki.sql to make custom.sql which would delete all entries in the table and then add only those desired for the project (you can even just copy lines from those two files). You would run this custom script once as part of the initial installagion and configuration. I'm going to try this and I will add documentation to the page on how that works, assuming that it does.

Alternatively, or additionally, one could have other .sql scripts with "common" interwiki configurations, though I don't know what common subsets might be popular. This might be more for an example than for practial use.

I can make some of the changes suggested or implied above, but since I'm new here and still learning wiki notation I thought I'd comment first and then start editing a little later.

--Eric Myers 13:20, 12 June 2006 (UTC)

Could we CUT DOWN on some of these?!
Using phpMyAdmin, I took a screenshot of all the pre-installed interwiki links. That's A LOT. Do you really think all of these are neccessary?! --72.71.210.173 18:51, 7 July 2006 (UTC)


 * I believe there are no pre-installed InterWiki links in a default MediaWiki 1.7.1 installation. You have to run maintenance/wikipedia-interwiki.sql to populate the interwiki table.  From the name it's obvious it creates a wikipedia equivalent, not to set up a MediaWiki. -- skierpage 22:16, 19 September 2006 (UTC)
 * I just installed mediawiki, and I can confirm that there are VERY MANY pre-installed interwiki links, just none of the wikimedia family, which is pretty weird considering that wikipedia is the one you're most likely to want, and it doesn't show up. 134.53.121.226

Language Interwiki on a Talk: page
It doesn't seem to work on a Talk page. I added en:Wikipedia talk:WikiProject Mathematics on zh:Wikipedia talk:數學興趣小組維基人列表, but the link appears in the main text.--Hillgentleman 03:36, 7 September 2006 (UTC)

language links in one wiki
Hello. A few months ago I was looking at this and either read here, or worked out, that you could manage multiple languages in just one DB and one Wiki. I can't see it here (I might be blind), so here is my explanation. I'll include it in the main article when my mind is working better (or feel free to).

The basic effect is that you add an interwiki link as normal, and it appear as normal, but alternate languages appear and are linked to in the Francais: namespace, or the Espanol: namespace. You cannot have both the interwiki and the namespace being the same. It might make sense to call one e.g. fr and one fri (fr for french and i for interwiki), as a french page linking to a french page would obviously need to specify its namespace, so it should be as short as possible.

You should be able to set it up with these two steps:


 * Tell the system to create a seperate namespace for each language:
 * Open up the localsettings.php file and add, for example:



$wgExtraNamespaces = array(100 => "Francais",              101 => "Francais_talk",               102 => "Espanol",	               103 => "Espanol_talk"	 	      ); ''


 * Then in the database tell the system that when it see's fr:PageName in a page to create the "in other languages" side panel.
 * Open up phpMyAdmin and in the 'interwiki' table enter a row for the language(s) (or use Special_page_to_work_with_the_interwiki_table) and, for example:


 *  fr    http://wiki.yourwiki.org/index.php?title=Francais:$1
 *  es    http://wiki.yourwiki.org/index.php?title=Espanol:$1

(Local and Trans should be false)

This will make it so when Pagename is entered in a page, that page will have a 'in other languages' sidepanel with a link to Francais:Pagename, which can be edited to include whatever translation you want of the page.

For me, I'd have the namespace be the ISO language code + a short identifier, like 'i', instead of being the whole word. This would be to make it shorter for users to type, as they will need to type it every time they link two pages together!

Using Special_page_to_work_with_the_interwiki_table makes it a bit friendlier to edit the interwiki table

Clicking on the language links when you have it set up the left, you can see they go to a w:Help:Namespace of their ISO Language code with an I on the end. Because Mediawiki wasn't designed to do what this idea proposes, we have to make a sacrifice in elegance. We cannot have the other langauges namespace be the same as the prefix we use to create the link. That's why I had to put an I on the end of the namespace.

Disadvantages
Other languages will have to link between their own pages by The Page so it appears like  The Page and not francais:The Page (unless we don't mind it looking ugly).

We currently use the : in some names, like Key:Highway. Using the system proposed here, any languages other than english would have to have Francais_Key: (or FrancaisKey:) as they're extra namespace, making it a bit more unwieldy. (You would also have to enter a fr_key prefix into the interwiki table)

Things I found out

 * You can't have the namespace called the same as one of the language prefixes in mediawiki/languages/names.php
 * This only works if you use as your language prefix one of the prefixes in mediawiki/languages/names.php

Note: You might be able to change the information in names.php if you prefer to have the namespace as the standard language code (ie, no i afterwards), but I haven't tried it, and I have no idea if it would break other things.

Other solutions

 * Multilanguage
 * Having seperate file systems and databases for each (see the article!)

Purge interwiki cache?
It appears MediaWiki caches the values from the interwiki table. DefaultSettings.php contains:

$wgInterwikiExpiry = 10800; # Expiry time for cache of interwiki table

which is 3 hours (3 * 60 * 60).

If I change a interwiki URL in maintenance/interwiki.sql and run that, the table is updated, but editing pages which use the interwiki tag do not reflect that change. Is there a maintenance PHP script to purge the interwiki cache immediately?

Not able to edit interwiki tabble because of blob typ
Me "iw_url" field is from typ "blob". How do I edit interwiki links? --77.20.38.239 17:17, 22 October 2010 (UTC)


 * If you use phpMyAdmin, then you can do the following:
 * Save the blob as a bin-file (it is simply a text file with one line)
 * Edit the bin-file locally with a text editor, then save it
 * Upload the changed bin-file
 * Tony Mach (talk) 11:28, 11 September 2014 (UTC)

Disabling interwiki linking
There seems to be missing documentation on how to disable interwiki linking. I have gone in and edited the secureAndSplit function in Title.php writing adding a "false &&" to "elseif( false && $this->getInterwikiLink( $p )", but this is a hack. There seems to be missing a $wgInterwikiEnable. I guess one can erase the content of the 'interwiki' table? &mdash; Fnielsen 17:11, 22 November 2011 (UTC)

Needs updating
> $ php maintenance/sql.php extensions/WikimediaMaintenance/wikipedia-interwiki.sql

This file was removed in 2014, by commit 3aac490d8f34797db70659665d4cbc7cdf160e86.