• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Wikisource

  • Template
  • Talk
  • Language
  • Watch
  • View source
(Redirected from Template:Wikisource4)
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 20,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
  • Module:Make Wikisource link (sandbox)
  • Module:ISO 639 name (sandbox)
  • Module:Check for unknown parameters (sandbox)

This is a versatile template which links to a source at one of our sister projects, Wikisource.

The default behaviour of this template is to present a string "English Wikisource has original text related to this article:" with a link to a page on Wikisource with the same name as the Wikipedia page. Its behavior can be modified in the following ways:

  • Modifying the link target
  • Modifying how the display text for the link
  • Linking to another language's Wikisource (including Multiple language Wikisource)
  • Linking to the source attached to the article via the interwiki link at Wikidata
  • Modifying the introductory text
  • Indicating that the source is by or about the article topic
  • Disabling categorisation (via |nocat=yes)
  • Displaying the source in italics (via |italics=yes)
  • Doing a combination of the above

Full example:

{{Wikisource|<link target>|<link display>|lang=<lang code>|has=<text to introduce the link>|nocat=yes to disable categorization|italics=yes to display the source in italics}}

Contents

  • 1 Modifying the link target
  • 2 Modifying the display text
  • 3 Linking to another language's Wikisource
  • 4 Modifying the introductory text
  • 5 Works by or about something
  • 6 Wikidata
  • 7 Categorisation
  • 8 TemplateData
  • 9 See also

Modifying the link target

To modify the link target, include the name of the document at Wikisource as the first parameter, or as |wslink=:

{{Wikisource|Magna Carta}} and {{Wikisource|wslink=Magna Carta}}

both produce:
English Wikisource has original text related to this article:
Magna Carta

Modifying the display text

The second parameter is the display text:

{{Wikisource|The Velveteen Rabbit#9|Name for The Velveteen Rabbit}}

produces:
English Wikisource has original text related to this article:
Name for The Velveteen Rabbit

You can alternatively use |title=, which has the same effect. This can be handy if you only want to alter the display text, not the link target.

Linking to another language's Wikisource

To link to another language's Wikisource, you can either use the |lang= parameter, or you can put the language before the source links.

{{Wikisource|la|Magna Carta|Magna Carta in Latin}}

and

{{Wikisource|Magna Carta|Magna Carta in Latin|lang=la}}

both produce:
Latin Wikisource has original text related to this article:
Magna Carta in Latin

Modifying the introductory text

The |has= parameter overrides the text following the word "has" introductory text text: {{Wikisource|Magna Carta|has=the full text of the Magna Carta}}

produces:
English Wikisource has the full text of the Magna Carta:
Magna Carta

Works by or about something

The |works= parameter has four values, all of which indicate that the source at Wikisource is by or about the subject matter. It can be set to any case-insensitive version of:

  • by
  • about
  • both (or equivalently and)
  • or (discouraged; please be specific about what text is present at Wikisource)

If given anything else, the parameter is ignored. The parameter has no viable effect if |has= is provided (see § Modifying the introductory text), but will change the link target to include an Author prefix (or the equivalent namespace used in the language version, according to {{Wikisource/Author}}).

For example, {{Wikisource|Author:Marcus Tullius Cicero|Cicero|works=both}} produces:

English Wikisource has original works by and about:
Cicero

Wikidata

If the template is not given a link target, it will attempt to find an interwiki link from Wikidata. If no Wikidata link is found, it will search Wikisource for the Wikipedia article's title.

Categorisation

If no Wikidata link is found, the template will populate Category:Wikisource templates with missing id (7,294). If the lack of interwiki link is intentional, add |nocat=yes.

Pages using {{wikisource}} with unknown parameters are sorted into Category:Pages using Wikisource with unknown parameters (0). This is not turned off with |nocat=yes.

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Wikisource in articles based on its TemplateData.

TemplateData for Wikisource

No description.

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Language codelang

The ISO 639 code of the Wikisource language. "mul" indicates the Multilingual Wikisource.

Suggested values
mul es la fr de
Default
en
Example
es
Lineoptional
Link target1 wslink wislink

The link target, without any Wikisource: or language prefix

Example
Magna Carta
Linesuggested
Display text2 title

The link's display text

Default
The link target
Example
Full text of the Magna Carta
Lineoptional
Has text replacementhas

The text following "Wikisource has" ...

Default
text related to this article
Example
the full text of the Magna Carta
Lineoptional
Works byworks

This parameter indicates that the content at Wikisource is by/about the subject, rather than a copy of the subject. Can be set to "by", "about", or "both", or "or", depending on what type of content is present at Wikisource. Other values are ignored.

Suggested values
by about both or and
Lineoptional
positionposition

If set to "left", displays the box floats to the left

Suggested values
left
Lineoptional
nocatnocat

If true, disables categorisation in [[Category:Wikisource templates with missing id]]. This is useful if the omission of a sitelink at Wikidata is intentional.

Default
false
Booleanoptional
italicsitalic italics

If true, displays the source in italics

Default
false
Booleanoptional
Run diagnosticsdiagnose

If true, displays some diagnostic information. Useful for debugging.

Booleanoptional

See also

  • {{Wikisource-inline}} – inline version
  • {{Wikisource-multi}} – for linking to multiple pages on Wikisource
  • {{Cite wikisource}} – used to cite sources in Wikipedia
  • {{Ws}} – for a less complicated interface than {{Cite wikisource}}
  • {{Wikisource redirect}} – a specialized template for redirecting to Wikisource

  • Wikipedia:Sister projects for background and full usage information
  • Wikipedia:Template messages/Sister projects#Wikisource for full usage information

  • {{Copy to Wikisource}}
The above documentation is transcluded from Template:Wikisource/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Wikisource&oldid=1294424305"
Last edited on 7 June 2025, at 16:58

Languages

    • Afrikaans
    • Alemannisch
    • Ænglisc
    • العربية
    • Aragonés
    • Արեւմտահայերէն
    • অসমীয়া
    • Asturianu
    • Авар
    • Azərbaycanca
    • تۆرکجه
    • Basa Bali
    • বাংলা
    • 閩南語 / Bân-lâm-gí
    • Basa Banyumasan
    • Башҡортса
    • Беларуская
    • Беларуская (тарашкевіца)
    • भोजपुरी
    • Български
    • Boarisch
    • Bosanski
    • Brezhoneg
    • Català
    • Чӑвашла
    • Cebuano
    • Čeština
    • Chavacano de Zamboanga
    • Dansk
    • Deutsch
    • Diné bizaad
    • Dolnoserbski
    • डोटेली
    • Eesti
    • Ελληνικά
    • Español
    • Esperanto
    • Euskara
    • فارسی
    • Fiji Hindi
    • Français
    • Frysk
    • Gaeilge
    • Galego
    • ГӀалгӀай
    • 贛語
    • ગુજરાતી
    • गोंयची कोंकणी / Gõychi Konknni
    • 客家語 / Hak-kâ-ngî
    • 한국어
    • Հայերեն
    • हिन्दी
    • Hornjoserbsce
    • Hrvatski
    • Ilokano
    • Bahasa Indonesia
    • IsiXhosa
    • Íslenska
    • Italiano
    • עברית
    • Jawa
    • ಕನ್ನಡ
    • Kapampangan
    • ქართული
    • Қазақша
    • Kiswahili
    • Kurdî
    • Ladino
    • Лакку
    • Latina
    • Latviešu
    • Lëtzebuergesch
    • Lietuvių
    • Lingála
    • Magyar
    • मैथिली
    • Македонски
    • മലയാളം
    • Malti
    • मराठी
    • مصرى
    • Bahasa Melayu
    • Minangkabau
    • 閩東語 / Mìng-dĕ̤ng-ngṳ̄
    • Мокшень
    • Монгол
    • မြန်မာဘာသာ
    • Nederlands
    • नेपाली
    • नेपाल भाषा
    • 日本語
    • Нохчийн
    • Nordfriisk
    • Norsk bokmål
    • Norsk nynorsk
    • Occitan
    • ଓଡ଼ିଆ
    • Oʻzbekcha / ўзбекча
    • Pälzisch
    • Picard
    • Plattdüütsch
    • Polski
    • Português
    • Română
    • Rumantsch
    • Русский
    • संस्कृतम्
    • ᱥᱟᱱᱛᱟᱲᱤ
    • Scots
    • Seeltersk
    • Shqip
    • සිංහල
    • Simple English
    • SiSwati
    • Slovenčina
    • Slovenščina
    • کوردی
    • Српски / srpski
    • Srpskohrvatski / српскохрватски
    • Sunda
    • Suomi
    • Svenska
    • Tagalog
    • தமிழ்
    • Татарча / tatarça
    • တႆး
    • తెలుగు
    • ไทย
    • Тоҷикӣ
    • ತುಳು
    • Türkçe
    • Удмурт
    • Українська
    • اردو
    • Tiếng Việt
    • 文言
    • West-Vlams
    • Winaray
    • 吴语
    • Yorùbá
    • 粵語
    • 中文
    • Kadazandusun
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 7 June 2025, at 16:58 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop