Difference between revisions of "Template:IPA audio link/doc"

From blackwiki
Jump to navigation Jump to search
imported>Kaldari
imported>Kaldari
(usage)
Line 3: Line 3:
 
This template formats the audio link used by [[Template:IPA-all]] and similar templates at [[:Category:IPA templates]]. '''It should not be used directly in articles.'''
 
This template formats the audio link used by [[Template:IPA-all]] and similar templates at [[:Category:IPA templates]]. '''It should not be used directly in articles.'''
  
−
==Examples==
+
==Usage==
−
*Antigua and Barbuda{{IPA audio link|En-us-Antigua and Barbuda-2.oga}}
+
Usage within an IPA template will typically be something similar to:<br>
−
*:<code>Antigua and Barbuda<nowiki>{{IPA audio link|En-us-Antigua and Barbuda-2.oga}}</nowiki></code>
+
<code><nowiki>{{#if:{{{3|}}}|{{IPA audio link|{{{3}}}|attribution={{{attribution|}}} }} }}</nowiki></code>
−
*Antigua and Barbuda{{IPA audio link|En-us-Antigua and Barbuda-2.oga|attribution=no}}
+
Where "3" is the parameter for the file name (e.g. "Fr-Avignon.ogg") and "attribution" is an optional parameter specifying whether or not to create an attribution link (i.e. a link to the file page).
−
*:<code>Antigua and Barbuda<nowiki>{{IPA audio link|En-us-Antigua and Barbuda-2.oga|attribution=no}}</nowiki></code>
+
 
 +
==Example output==
 +
Note that this template is not intended for use directly in articles. The following examples are purely to show variations in output.
 +
; Basic
 +
*[aviɲɔ̃]{{IPA audio link|Fr-Avignon.ogg}}
 +
*:<code>[aviɲɔ̃]<nowiki>{{IPA audio link|Fr-Avignon.ogg}}</nowiki></code>
 +
 
 +
; Without attribution link
 +
Audio files which are licensed as CC0 or public domain may be linked to without an attribution link:
 +
*[aviɲɔ̃]{{IPA audio link|Fr-Avignon.ogg|attribution=no}}
 +
*:<code>[aviɲɔ̃]<nowiki>{{IPA audio link|Fr-Avignon.ogg|attribution=no}}</nowiki></code>
  
 
==TemplateData==
 
==TemplateData==

Revision as of 16:21, 30 October 2020

This template formats the audio link used by Template:IPA-all and similar templates at Category:IPA templates. It should not be used directly in articles.

Usage

Usage within an IPA template will typically be something similar to:
{{#if:{{{3|}}}|{{IPA audio link|{{{3}}}|attribution={{{attribution|}}} }} }} Where "3" is the parameter for the file name (e.g. "Fr-Avignon.ogg") and "attribution" is an optional parameter specifying whether or not to create an attribution link (i.e. a link to the file page).

Example output

Note that this template is not intended for use directly in articles. The following examples are purely to show variations in output.

Basic
  • [aviɲɔ̃] (Audio file "Fr-Avignon.ogg" not found)
    [aviɲɔ̃]{{IPA audio link|Fr-Avignon.ogg}}
Without attribution link

Audio files which are licensed as CC0 or public domain may be linked to without an attribution link:

  • [aviɲɔ̃] Audio file "Fr-Avignon.ogg" not found
    [aviɲɔ̃]{{IPA audio link|Fr-Avignon.ogg|attribution=no}}

TemplateData

Formats the audio link used by IPA-all and similar templates

Template parameters

ParameterDescriptionTypeStatus
Audio file1

The audio file with the "FIle:" prefix

Example
En-us-Foobar.ogg
Unknownoptional
Attribution linkattribution

If you set this to "no" the template will only display a speaker icon that links directly to the audio file (with no link to the File page).

Example
no
Unknownoptional