Template:Audio

From wikiNonStop
Revision as of 00:06, 19 May 2024 by en>Snowmanonahoe (apply noprint class, currently this template appears ugly and useless when printed, especially because the sound icon doesn't appear for some reason)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Template documentation

Purpose

This template links to an audio file for quick listening. It is meant to be used inline with text, for pronunciations and the like. Please note that this just creates a link to the file and does not actually embed the file. If the file is Non-Free and only referenced via this template it is not in compliance with Wikipedia:Non-free content criteria § Policy #7.

The template uses the Phonos MediaWiki extension to create an audio link that plays on click.

Usage

{{Audio|name of sound file|text to use as link to soundfile}}

Example
'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...
Alabama (<phonos file="en-us-Alabama.ogg">pronunciation</phonos>) is a state located in...

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools.

Audio

Use this template to add an inline link to an audio file, preceded by a speaker icon.

Template parameters

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Audio file1

Audio file to link to

Example
En-uk-London.ogg
Filerequired
Label2

Text to replace the filename in the link

Example
English pronunciation
Stringoptional

See also

Template:Audio templates