From World Afropedia
Jump to: navigation, search
Template documentation[view] [edit] [history] [purge]

{{Listen}} allows audio files to be embedded in articles. It should be used for audio files that are set off from the text, like music clips or sound recordings.

Simple usage

| filename    = 
| title       = 
| description = 
  • filename (Required): the pagename of the media file, without the File: (formerly Image:) prefix
  • title (Required): the title of the audio file, to be displayed. Do not use quote marks around song titles.
  • description: a description of the audio file

Multiple files

Additional files can be embedded in an article with one template by appending a number to each parameter. Up to ten files can be included.

| filename     = 
| title        = 
| alt          = 
| description  = 
| filename2    = 
| title2       = 
| alt2         = 
| description2 = 
| filename3    = 
| title3       = 
| alt3         = 
| description3 = 
  • filename (Required): the pagename of the media file, without the File: (formerly Image:) prefix
  • title (Required): the title of the audio file, to be displayed. Do not use quote marks around song titles.
  • alt: alt text for the image displayed for the file, for visually impaired readers; see Wikipedia:Alternative text for images. This is needed for file formats such as Ogg's .ogv format that include video as well as sound. The alt text should describe just the initial static image, not the entire video or its sound.
  • description: a description of the audio file

Style parameters

The template also takes a number of style parameters to control its appearance:

  • type: can be used to alter the image displayed at the left depending on the type of audio content being embedded. Acceptable values are sound, speech and music (default)
  • header: can be used to add a header to the box.
  • help: if set |help=no, suppresses the help text that normally appears at the bottom of the box. Only do this if there are other audio files on the page which do have the help link; it must be provided on at least the first file on the article.
  • pos: by default the box floats to the right side of the screen. Setting this to left will cause the box to instead float on the left-hand side.
  • image: define a different image. Eg |image=[[File:Example.jps|20px]]. You can set |image=none to disable the image entirely.
  • style: can be used to pass specific style instructions to the box. Setting this to float:none will anchor the box when this is convenient. Setting this to float:none; clear:none will enable the anchored box to co-exist gracefully beside another floating box.
  • play#: some media files cannot be displayed inline; if this is the case set |play=no to prevent the broken inline link from displaying.
  • plain: if set |plain=yes, removes most of the ornamentation (table border, image, and help links) to give a minimalist version. This also removes the left/right float and positioning, to allow the box to be manually positioned as desired using the |style= (e.g., |style=float:right) parameter and surrounding markup.


Basic example
| filename    = Accordian chords-01.ogg
| title       = Accordion chords
| description = Chords being played on an accordion
Example with video
| header      = Inaugural Address
| filename    = Barack Obama inaugural address.ogv
| alt         = A black man in a black coat gestures and talks at a lecturn surrounded by teleprompters. Behind him, in the background, are about a dozen warmly-dressed onlookers.
| title       = Inaugural address of Barack Obama
| description = Barack Obama delivers his [[inaugural address]] on January 20, 2009.<br>(Duration: 21 minutes, 21 seconds)
| help        = no
| type        = sound
Example with header
| filename    = Frase de Neil Armstrong.ogg
| title       = "One small step for a man..."
| description = First words spoken on the [[moon]].
| type        = speech
| pos         = left
| header      = Recordings of this phrase:
Plain example
| filename = Accordian chords-01.ogg
| title    = Accordion chords
| plain    = yes
| style    = float:left
Multiple files
| filename     = Accordian chords-01.ogg
| title        = Accordion chords
| description  = Chords being played on an accordion
| type         = music
| filename2    = Moonlight.ogg
| title2       = ''Moonlight Sonata''
| description2 = [[Beethoven]]'s "Sonata in C-sharp minor"
| filename3    = Au_clair_de_la_lune_mode_do.mid
| title3       = Au Clair de la Lune
| description3 = The traditional French children's song
| play3        = no


The HTML mark-up produced by this template includes an hAudio microformat that makes an audio recording's details readily parsable by computer programs. This aids tasks such as the cataloguing of articles and maintenance of databases. For more information about the use of microformats on Wikipedia, please visit the Microformat WikiProject.

Date-of-publication ("published") information will only be included in the microformat if {{start date}} (or, where appropriate, {{start date and age}}) is used in a parent infobox/template. Do not, however, use

  1. REDIRECT Template:Template link with link off
or {{start date and age}} if a date before 1583 CE is involved.

Use {{duration}} to specify the duration/length of a recording. For instance, if the recording's duration is 3 minutes 45 seconds, use {{duration|m=3|s=45}} (which appears as: 3:45). If needed, |h= may be included to specify a number of hours.

Please do not remove instances of these subtemplates.

Classes used

The HTML classes this microformat uses include:

  • haudio
  • fn
  • album
  • description
  • category
  • contributor
  • duration
  • h
  • item
  • min
  • photo
  • position
  • price
  • published
  • s
Please do not rename or remove these classes
nor collapse nested elements which use them.

See also

ar:قالب:إستمع be:Шаблон:Listen be-x-old:Шаблён:Слухаць bs:Šablon:Slušajte ca:Plantilla:Escoltar cs:Šablona:Poslech da:Skabelon:Lyt eo:Ŝablono:Aŭskultu es:Plantilla:Multimedia fa:الگو:شنیدن fr:Modèle:Son hsb:Předłoha:Posłuchaj hu:Sablon:Hallgat id:Templat:Dengar it:Template:Multimedia lv:Veidne:Listen ja:Template:試聴 mk:Шаблон:Преслушување ms:Templat:Listen/doc no:mal:lytte ka:თარგი:მოსმენა kk:Template:Listen pt:Predefinição:Escute ru:Шаблон:Listen sl:Predloga:Poslušaj fi:Malline:Kuuntele sv:Mall:Lyssna vi:Tiêu bản:Nghe ko:틀:Listen tr:Şablon:Dinle2 zh:Template:Listen