Difference between revisions of "Template:Audio/doc"

From blackwiki
Jump to navigation Jump to search
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(54 intermediate revisions by 44 users not shown)
Line 1: Line 1:
{{documentation subpage}}<includeonly>{{pp-template|small=yes}}</includeonly>
+
{{Documentation subpage}}
<!--PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE-->
+
<!--PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE-->
 +
{{for|instructions on inserting audio files|Wikipedia:Creation and usage of media files#Audio}}
 +
=== 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 [[WP:NFCC#7|Wikipedia:Non-free content criteria § Policy #7]].
  
== Purpose ==
+
=== Usage ===
 +
; Basic:
 +
<code><nowiki>{{Audio|name of sound file|text to use as link to soundfile|help=}}</nowiki></code>
  
This template links to an audio file for quick listening. It is meant to be used inline with text, for pronunciations and the like.
+
; Simple
 +
: <code><nowiki>'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...</nowiki></code>
 +
: → '''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...
 +
; Help links
 +
Setting {{para|help|no}} disables the "help/info" links. If this is done the template {{tlx|inline audio}} ''must'' be shown on the page.
  
== Usage ==
+
: <code><nowiki>'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation of "Alabama"|help=no}})</nowiki></code>
 +
: → '''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation|help=no}})
 +
: Todo: add {{tlx|inline audio}} to this page.
  
<code><nowiki>{{Audio|name of sound file|text to use as link to soundfile}}</nowiki></code>
+
=== Microformat ===
 +
{{UF-audio}}
  
Example:
+
=== See also ===
 +
{{Audio templates}}
  
:<code><nowiki>'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...</nowiki></code>
+
<includeonly>{{Sandbox other|
 
+
| <!-- PLEASE ADD CATEGORIES BELOW THIS LINE: -->
gives this:
+
[[Category:Audio templates]]
 
+
[[Category:Templates that add a tracking category]]
:'''Bordeaux''' ({{Audio|Fr-Bordeaux.ogg|pronunciation}}) is a [[Seaport|port]] city in...
+
}}</includeonly>
 
 
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>&nbsp;) is a [[Seaport|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 <code>.audiolink a {</code>).  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 ==
 
 
 
* {{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-nohelp}}, a variant with no help links.
 
* {{tl|Audio-pipe}}, a variant linking to a soundfile and an article, showing a display text
 
* {{tl|Spoken}}, which adds only the small icon with no links.
 
* {{tl|Listen}}, which sets an audio clip off from the main text.
 
 
 
<includeonly>
 
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. -->
 
[[Category:Audio templates|{{PAGENAME}}]]
 
 
 
<!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. -->
 
[[de:Vorlage:Audio]]
 
[[bg:Шаблон:Audio]]
 
[[es:Plantilla:Audio]]
 
[[eo:Ŝablono:Sondosiero]]
 
[[fa:الگو:صدا]]
 
[[fr:Modèle:Prononciation]]
 
[[is:Snið:Hljóð]]
 
[[it:Template:Audio]]
 
[[ko:틀:듣기]]
 
[[mk:Шаблон:Аудио]]
 
[[ja:Template:Audio]]
 
[[no:Mal:Audio]]
 
[[pl:Szablon:Audio]]
 
[[pt:Predefinição:Áudio]]
 
[[ru:Шаблон:Audio]]
 
[[rmy:Format:Shun]]
 
[[sl:Predloga:Avdio]]
 
[[sv:Mall:Audio]]
 
[[th:Template:เสียง]]
 
[[vi:Tiêu bản:Âm thanh]]
 
</includeonly>
 

Latest revision as of 23:23, 23 April 2020

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.

Usage

Basic

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

Simple
'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation}}) is a state located in...
Alabama (About this soundpronunciation ) is a state located in...
Help links

Setting |help=no disables the "help/info" links. If this is done the template {{inline audio}} must be shown on the page.

'''Alabama''' ({{Audio|en-us-Alabama.ogg|pronunciation of "Alabama"|help=no}})
Alabama (About this soundpronunciation)
Todo: add {{inline audio}} to this page.

Microformat

Template:UF-audio

See also