मैनुअल:इंटरविकी

This page is a translated version of the page Manual:Interwiki and the translation is 43% complete.
Outdated translations are marked like this.

इंटरविकी लिंक अन्य परियोजनाओं के पृष्ठों के लिए लिंक हैं, जो पूर्वलग्न आंतरिक लिंक शैली का उपयोग करते हैं।

इंटरविकी लिंक (उदाहरण के लिए) विकिपीडिया, विकीबुक्स, विकीन्यूज आदि के पृष्ठों या विभिन्न भाषाओं में आपके विकी-प्रोजेक्ट से लिंक करना संभव बनाते हैं। (देखें $१.)

"एक लिंक जैसे $कोड१ इस प्रकार दिखाई देगा: $कोड२ और आपको विकिपीडिया के मुख्य पृष्ठ पर ले जाएगा।"

अन्य परियोजनाओं के लिए इंटरविकी लिंक

टेबल और क्वेरी एपीआई

इंटरविकी लिंक मीडियाविकी डेटाबेस की $इंटरविकी तालिका में होस्ट किए जाते हैं। You can retrieve the interwiki list from the interwikimap property of the siteinfo meta query API, in other words by making an API request like api.php?action=query&meta=siteinfo&siprop=interwikimap

डिफ़ॉल्ट

कई विकिमीडिया परियोजनाएं (और अन्य) डिफ़ॉल्ट रूप से इंटरविकी लिंकिंग के लिए तैयार हैं, इसलिए आप उन्हें अपने डेटाबेस को संपादित किए बिना उपयोग कर सकते हैं।

निम्नलिखित अंतरविकी उपसर्गों के कुछ उदाहरण हैं जो डिफ़ॉल्ट रूप से उपलब्ध हैं (विकिपीडिया भी उपलब्ध है, 1.1 और बाद में):

उपसर्ग गंतव्य यूआरएल एक उदाहरण
commons https://commons.wikimedia.org/wiki/ [[commons:MediaWiki]]
mediazilla http://bugzilla.wikimedia.org/ [[mediazilla:1209]]
metawikimedia (संस्करण से पहले 1.23:3 $ https://meta.wikimedia.org/wiki/ [[metawikimedia:Main Page]]

The full list of default interwiki prefixes is available at maintenance/interwiki.list

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

In some installations, none of these are pre-installed.


इंटरविकी लिंकिंग के लिए एक नई वेबसाइट जोड़ना

इंटरविकी लिंक मीडियाविकी डेटाबेस की $इंटरविकी तालिका में होस्ट किए जाते हैं।

इन्हें संशोधित करने के लिए, आपको नीचे दिए गए अनुसार डेटाबेस को संपादित करने की आवश्यकता होगी।

"Interwiki" एक्सटेंशन का उपयोग करने की अनुशंसा की जाती है, जो प्रक्रिया को आसान बनाता है।

नीचे दिए गए उदाहरणों से पता चलता है कि अंग्रेजी विकिपीडिया के लिंक के रूप में w: कैसे सेट किया जाए, इसके अलावा डिफ़ॉल्ट रूप से अधिक वर्बोस "विकिपीडियाः" प्रविष्टि।

विचार फॉर्म की एक पंक्ति सम्मिलित करने के लिए हैः

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

interwiki टेबल पर

Single line

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

INSERT INTO interwiki (iw_prefix, iw_url, iw_api, iw_local, iw_trans, iw_wikiid) 
VALUES ('w', 'https://en.wikipedia.org/wiki/$1', 'https://en.wikipedia.org/w/api.php', 0, 1, '');


Export, add, re-import

Alternatively, you can use the following multi-step process, which exports the interwiki table, adds a line, then re-imports it:

  • डाटाबेस तालिका interwiki निर्यात करें
  • तालिका के अंत में निम्नलिखित रूप की एक पंक्ति जोड़ें (उदाहरण के लिए अंग्रेजी विकिपीडिया का उपयोग करना):
('w', 'https://en.wikipedia.org/wiki/$1', 1, 0);
In the above code, the semicolon ';' as seen, MUST be at the end of the table. उस तालिका के भीतर किसी भी अन्य पंक्ति के अंत में केवल ',' है।
  • डाटाबेस तालिका interwiki निर्यात करें

To test

To test configuration:

  • Go to your site,
  • create an article, with the following content:
  • [[w:Wikipedia:Village pump|]]
  • This should display a link to the 'Village pump' page on en.Wikipedia.org (the url https://en.wikipedia.org/wiki/Wikipedia:Village_pump)

Field documentation

Further information: Manual:Interwiki table


  विकि प्रबंधकों के लिए टिप्पणी: कई सहायता पृष्ठ MediaWiki.org के मैनुअल नामस्थान से लिंक हैं। इन लिंकों को अपने स्थानीय विकी पर काम करने के लिए, iw_prefix=manual और iw_url=http://www.mediawiki.org/wiki/Manual:$1 के साथ एक इंटरविकी लिंक जोड़ें


  विकि प्रबंधकों के लिए टिप्पणी: यदि ट्रांसक्लूडेड विकी में परिवर्तन किए जाते हैं तो आपके LocalSettings.php में $wgTranscludeCacheExpiry सेट किया जाना चाहिए। वैकल्पिक रूप से, आप अपने स्थानीय विकि पर तालिका ट्रांसकैश को फ्लश कर सकते हैं।


 
Interwiki links to other languages

If you have installed a Wiki family , you can link from an article in English to an article in German (if you have a German project, too). आप टूलबॉक्स के ठीक नीचे साइडबार में उन लिंक को दिखाने के लिए मीडियाविकी सेट कर सकते हैं।

आपके फाइलसिस्टम में, आपके मीडियाविकी इंस्टॉलेशन का एक उपफोल्डर है, जिसे "लैंग्वेज" कहा जाता है। वहाँ जाएँ और Names.php पर एक नज़र डालें क्योंकि इसमें ज्ञात भाषाओं और उनके उपसर्गों की सूची है। E.g. you want to add your German project, search Names.php for "Deutsch" and note the prefix "de".

यदि आप "सही" उपसर्ग जानते हैं, तो तालिका interwiki: में एक नई पंक्ति जोड़कर अपने डेटाबेस को संपादित करें।

iw_prefix language-prefix (e.g. "de" for German), which is listed in Names.php
iw_url URL to your wiki-project (e.g. http://de.example.org/index.php/$1)
iw_local same as above "Adding More"
iw_trans same as above "Adding More"

Now, you can link an article to the same in other languages. Adding [[de:Hauptseite]] 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: [[:de:Hauptseite]] or set $wgInterwikiMagic to false.

Exporting the interwiki table from a 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.

function ExtractInterwikiMapTable() {
	$.getJSON(mw.config.get('wgScriptPath') + '/api.php?action=query&meta=siteinfo&siprop=interwikimap&format=json', function(data) {
		var iw_prefix, iw_url, iw_local, iw_api, re_escape = /(')/g, result = '';
		for (var i = 0, iwm = data.query.interwikimap; i < iwm.length; i++) {
			iw_prefix = "'" + iwm[i].prefix.replace(re_escape, '\\$1') + "'";
			iw_url = "'" + iwm[i].url.replace(re_escape, '\\$1') + "'";
			iw_local = (typeof iwm[i].local == 'string') ? '1' : '0';
			iw_api = "'" + (iwm[i].iw_api || '').replace(re_escape, '\\$1') + "'";
			result += 'INSERT INTO interwiki (iw_prefix, iw_url, iw_local, iw_trans, iw_api) VALUES ('+iw_prefix+', '+iw_url+', '+iw_local+', 0, '+iw_api+');\n'
		}
		$('<textarea style="width:800px;height:400px;"/>').val(result).appendTo(document.body);
	});
}

$(ExtractInterwikiMapTable);
''[[imdbtitle:0389790|Bee Movie]]''Bee Movie
[http://www.imdb.com/title/tt0389790 Bee Movie]Bee Movie

Linksearch works for the latter only.

Wikitext using interwiki links isn't always easily transferable between different wikis because they don't consistently use the same interwiki prefixes, or they might not have them at all. Additionally, interwiki links can sometimes mislead users since they don't know when they're being sent to another site.

You can choose between "extiw" and "external text" CSS classes for links, depending on whether you want them to look the same or different. Using just the interwiki link is easier to type, but copying the URL from the webpage is handy. Templates like w:Template:imdb title can be set up to use either an interwiki link with a parameter like "tt0389790" or "0389790", or an external link with a parameter like one of those or the full URL, making it easier to include IMDb references.

Interwiki links can be configured to point to the same wiki they are being rendered from. For example, mw:Manual:Interwiki/hi points to this page. These links are treated identically to internal links and do show up on Special:WhatLinksHere, appear bold if they are a selflink like the above, appear red if the page doesn't exist, etc.

See also