Jump to content

Template:audio/documentation

From Wiktionary, the free dictionary
Documentation for Template:audio. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

This template links to an audio file of spoken language, typically in the "Pronunciation" section of an entry to indicate how a term is pronounced.

To link to an audio file connected to the meaning of the entry (for example, a recording of a klaxon sound in the klaxon entry), use {{listen}}.

Parameters

[edit]
|1= (required)
The language code (see Wiktionary:List of languages) for the current language section. The parameter |lang= is a deprecated synonym; please do not use. If this is used, all numbered parameters move down by one.
|2= (required)
The name of the audio file.
|3=
The caption to use, in place of "Audio". In most cases, don't override this, but use one of the following parameters instead.
|q=
Specifies a qualifier to be placed before the audio box, after the "Audio" caption. This is formatted with the {{q}}/{{qualifier}} template.
|a=
Specifies one or more comma-separated accent qualifiers to be placed before the audio box, after the "Audio" caption, and are useful for specifying the accent found in the audio file. These are formatted with the {{a}}/{{accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier.
|qq=
Specifies a qualifier to be placed at the end, after the audio box. Normally, use |q= instead of this, unless the qualifier is particularly long. This is formatted with the {{q}}/{{qualifier}} template.
|aa=
Specifies one or more comma-separated accent qualifiers to be placed at the end, after the audio box. Normally, use |a= instead of this, unless the qualifier is particularly long. These are formatted with the {{a}}/{{accent}} template. To be recognized as a separator, there must be no space following the comma; otherwise, the comma is treated as an embedded comma within the accent qualifier.
|ref=
Specifies one or more reference notes to be placed directly after the audio box. The reference is placed in the ===References=== section at the bottom of the language's entry. See below for the format of this parameter.
|text=
Specifies the text of the audio snippet, if it isn't the same as the term being illustrated. This can be used, for example, when the audio snippet contains extra words in it (e.g. articles).
|IPA=
Specifies the IPA pronunciation of the audio snippet. This can be used, for example, when the audio snippet contains extra words in it, to make it easier to pick out the relevant term. The IPA should be enclosed in brackets or slashes, like the parameters of {{IPA}}.
|t=
Specifies the meaning (gloss) of the text in |text=, if that text is in a foreign language and its meaning isn't obvious.
|lit=
Specifies the literal meaning of the text in |text=, if needed.
|tr=
Specifies the manual transliteration of the text in |text=, for text in non-Latin scripts where either the automatic transliteration isn't correct or there is no automatic transliteration (e.g. in Persian and Hebrew).
|ts=
Specifies the transcription of the text in |text=, for text in non-Latin scripts where the transliteration is radically different from the actual pronunciation. To be used sparingly and only for certain languages; see the description of this parameter in {{l}} for more information.
|pos=
Specifies the part of speech of the text in |text=. Included mostly for completeness; rarely needed.
|nocat=1
Turns off categorization.
|sort=
Manual sortkey. Use sparingly; the makeSortKey method in Module:languages can usually generate the correct sortkey.
|bad=
To formulate a warning to the reader about quality problems of the audio.

Examples

[edit]
The file name should be formatted as [language code]-[dialect if any]-[term].
  • Wikitext: {{audio|en|En-uk-ubiquitous.ogg|a=RP}}
  • Result:
    Audio (Received Pronunciation):(file)
  • Wikitext: {{audio|en|En-uk-to talk.ogg|a=UK|text=to talk}}
  • Result:
    Audio (UK); to talk:(file)
  • Wikitext: {{audio|fr|Fr-hors d oeuvre-fr-Paris.ogg|a=France|text=un hors-d'œuvre}}
  • Result:
    Audio (France); un hors-d'œuvre:(file)
  • Wikitext: {{audio|en|En-abthane.flac|IPA=/əbˈθeɪn/}}
  • Result:
    Audio; /əbˈθeɪn/:(file)
  • Wikitext: {{audio|fr|LL-Q150 (fra)-WikiLucas00-avoir un nom à coucher dehors.wav|IPA=/a.vwaʁ œ̃ nɔ̃ a ku.ʃe də.ɔʁ/|a=Lyon|lit=to have a noun to hide behind|t=to have a jawbreaker/mouthful|text=avoir un nom à coucher dehors}}
  • Result:
    Audio (Lyon); avoir un nom à coucher dehors (literally to have a noun to hide behind) /a.vwaʁ œ̃ nɔ̃ a ku.ʃe də.ɔʁ/:(file)

References

[edit]

The |refN= parameter is used to specify one or more references for a given pronunciation and works similarly to the <ref> tag. For example, specifying |ref={{R:it:DiPI|bendo}} is similar to placing <ref>{{R:it:DiPI|bendo}}</ref> after the call to {{IPA}}, except that it can be used to insert references directly after a given pronunciation when there are several.

To specify multiple references, separate them with  !!! (optionally with spaces around it). For example, the following:

{{audio|it|It-bendo.ogg|ref={{R:it:DiPI|bendo}} !!! {{R:it:Olivetti}}}}

is similar to the following:

{{audio|it|It-bendo.ogg}}<ref>{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref>

To specify the equivalent of the <ref name="NAME" group="GROUP">...</ref>, use <<name:NAME>> and/or <<group:GROUP>> directly following the reference text. For example, the following:

{{audio|it|It-bendo.ogg|ref={{R:it:DiPI|bendo}}<<name:bendo>> !!! {{R:it:Olivetti}}}}

is similar to the following:

{{audio|it|It-bendo.ogg}}<ref name="bendo">{{R:it:DiPI|bendo}}</ref><ref>{{R:it:Olivetti}}</ref>

Similarly, the following:

{{audio|it|It-bendo.ogg|ref={{R:it:DiPI|bendo}}<<name:bendo>><<group:pron>>}}

is similar to the following:

{{audio|it|It-bendo.ogg}}<ref name="bendo" group="pron">{{R:it:DiPI|bendo}}</ref>

To reference a prior name, as in <ref name="bendo"/>, leave the reference text blank:

{{audio|it|It-bendo.ogg|ref=<<name:bendo>>}}

Similarly, to reference a prior name in a particular group, as in <ref name="bendo" group="pron"/>, use:

{{audio|it|It-bendo.ogg|ref=<<name:bendo>><<group:pron>>}}

See also

[edit]
  • {{listen}} – for relevant sound samples (not spoken language)


TemplateData

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

TemplateData for audio


An audio file to assist readers pronouncing the word. Labeled with language and possibly dialect.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Language1

The language (see [[Wiktionary:Languages]]) the recording is in.

Example
en
Stringrequired
Audio file2

The sound file to play.

Example
en-US pronunciation of "antishinto".ogg
Filerequired
Caption3

Text displayed before the audio box. Defaults to 'Audio'; rarely needs to be specified.

Example
the sound of a pig's "oink"
Stringoptional
Left accent qualifier(s)a

Specifies one or more comma-separated accent qualifiers to be placed before the audio box. These are formatted with the {{a}}/{{accent}} template.

Stringoptional
Left qualifierq

Specifies a qualifier to be placed before the audio box. This is formatted with the {{q}}/{{qualifier}} template.

Stringoptional
Right accent qualifier(s)aa

Specifies one or more comma-separated accent qualifiers to be placed after the audio box. These are formatted with the {{a}}/{{accent}} template.

Stringoptional
Right qualifierqq

Specifies a qualifier to be placed after the audio box. This is formatted with the {{q}}/{{qualifier}} template.

Stringoptional
Referenceref

Specifies a reference note to be placed directly after the audio box. The reference is placed in the ===References=== section at the bottom of the language's entry.

Stringoptional
Text of audio snippettext

Specifies the text of the audio snippet, used especially when it contains additional words.

Stringoptional
IPA of audio snippetIPA

Specifies the IPA pronunciation of the audio snippet, used especially when it contains additional words.

Stringoptional