Jump to content

Module:InterwikiTable/doc

විකිපීඩියා වෙතින්
11:10, 22 නොවැම්බර් 2023 වන විට Lee (සාකච්ඡාව | දායකත්ව) (en:Module:InterwikiTable/doc වෙතින් එක් සංශෝධනයක්) විසින් සිදු කර ඇති සංශෝධන
(වෙනස) ← පැරණි සංශෝධනය | වත්මන් සංශෝධනය (වෙනස) | නව සංශෝධනය → (වෙනස)


This is a table of sites containing data about the interwiki prefixes of various Wikimedia sites.

The module cannot be accessed directly from #invoke. It should be loaded from another Lua module using mw.loadData, like this:

local interwiki_table = mw.loadData('Module:InterwikiTable')

The table is made up of subtables for each interwiki destination. For example, interwiki_table.wikipedia points to the entry for Wikipedia. Entries usually correspond to a Wikimedia site, but not always. For example, both the "rev" and "mediawiki" subtables point to mediawiki.org.

Each subtable has five fields:

  • domain - The base domain name of the website, without any language codes.
  • domain_primary - Whether this is the primary entry for the domain.
  • iw_prefix - A table of valid interwiki prefixes for the site. See Help:Interwiki linking.
  • title_prefix - The text between the domain name and the project's article titles.
  • takes_lang_prefix - Whether the project has separate subdomains for different languages, e.g. es.wikipedia.org.
  • interwiki_table.wikipedia.domain → "wikipedia.org"
  • interwiki_table.wikiversity.domain_primary → true
  • interwiki_table.mediawiki.iw_prefix[1] → "mw"
  • interwiki_table.wikibooks.title_prefix → "/wiki/"
  • interwiki_table.meta.takes_lang_prefix → false


"https://si.wikipedia.org/w/index.php?title=Module:InterwikiTable/doc&oldid=604994" වෙතින් සම්ප්‍රවේශනය කෙරිණි