Difference between revisions of "Template:Audio/doc"
imported>MZMcBride (rm spaces) |
imported>Komusou (updated to {{Template doc page}}, documented that printouts will remove the "help·info" bit) |
||
| Line 1: | Line 1: | ||
| − | + | {{Template doc page}} | |
| − | <!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS | + | <!-- |
| + | PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE | ||
| + | YOU CAN EDIT THE TEMPLATE DOCUMENTATION BELOW THIS COMMENT | ||
| + | --> | ||
== Purpose == | == 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. | This template links to an audio file for quick listening. It is meant to be used inline with text, for pronunciations and the like. | ||
== Usage == | == Usage == | ||
| + | |||
<code><nowiki>{{Audio|name of sound file|text to use as link to soundfile}}</nowiki></code> | <code><nowiki>{{Audio|name of sound file|text to use as link to soundfile}}</nowiki></code> | ||
Example: | Example: | ||
| + | |||
:<code><nowiki>'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...</nowiki></code> | :<code><nowiki>'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...</nowiki></code> | ||
| + | |||
gives this: | gives this: | ||
| + | |||
:'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in... | :'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in... | ||
| + | |||
| + | Note that a printout of the page will remove the "help·info" bit and give: | ||
| + | |||
| + | :'''Bordeaux''' (<span class="unicode audiolink">[[:Media:Fr-Bordeaux.ogg|pronunciation]]</span> ) is a [[Seaport|port]] city in... | ||
== Using on other wikis == | == Using on other wikis == | ||
| + | |||
This is one of several templates that use [[CSS]] to format the template instead of containing all the formatting inline. '''It will not work on another wiki unless you copy both the template and the CSS rules.''' | This is one of several templates that use [[CSS]] to format the template instead of containing all the formatting inline. '''It will not work on another wiki unless you copy both the template and the CSS rules.''' | ||
| Line 20: | Line 33: | ||
== See also == | == See also == | ||
| + | |||
* {{tl|Audio-nohelp}}, a variant of this template with no help links. | * {{tl|Audio-nohelp}}, a variant of this template with no help links. | ||
* {{tl|Audio-IPA}}, a variant of this template to be used with [[International Phonetic Alphabet|IPA]] notation. | * {{tl|Audio-IPA}}, a variant of this template to be used with [[International Phonetic Alphabet|IPA]] notation. | ||
| Line 27: | Line 41: | ||
<includeonly> | <includeonly> | ||
| − | <!-- ADD CATEGORIES BELOW THIS LINE --> | + | |
| + | <!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. --> | ||
| + | |||
[[Category:Audio templates|{{PAGENAME}}]] | [[Category:Audio templates|{{PAGENAME}}]] | ||
| − | <!-- ADD INTERWIKIS BELOW THIS LINE --> | + | <!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. --> |
| + | |||
[[de:Vorlage:Audio]] | [[de:Vorlage:Audio]] | ||
[[bg:Шаблон:Audio]] | [[bg:Шаблон:Audio]] | ||
Revision as of 06:29, 24 September 2007
Contents
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.
Usage
{{Audio|name of sound file|text to use as link to soundfile}}
Example:
'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...
gives this:
- Bordeaux (Audio file "Fr-Bordeaux.ogg" not found) is a port city in...
Note that a printout of the page will remove the "help·info" bit and give:
- Bordeaux (pronunciation ) is a port city in...
Using on other wikis
This is one of several templates that use CSS to format the template instead of containing all the formatting inline. It will not work on another wiki unless you copy both the template and the CSS rules.
This particular template depends on the "audiolink" css class to add the loudspeaker icon as a background image for the link, which allows it to be clicked and go to the same link destination instead of the image's description page.
These CSS rules are in MediaWiki:Common.css (the part that starts with .audiolink a {). You will need to get an administrator on your local wiki to add the rules to your site's CSS. (Likewise, tweaking the size and placement of the icon is done by changing the CSS; not the template itself.)
See also
- {{Audio-nohelp}}, a variant of this template with no help links.
- {{Audio-IPA}}, a variant of this template to be used with IPA notation.
- {{Audio-IPA-nohelp}}, a variant with no help links.
- {{Spoken}}, which adds only the small icon with no links.
- {{Listen}}, which sets an audio clip off from the main text.