Content deleted Content added
m Updated transclusion at top of page. |
m Reverted edit by 2601:18A:8178:35A0:A058:46D6:3C34:82D9 (talk) to last version by Paine Ellsworth |
||
(14 intermediate revisions by 5 users not shown) | |||
Line 1:
{{Documentation subpage}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{lua|Module:IPA symbol}}
The resulting article name should exist. The input symbol may be multiple characters
This template has one parameter that is mandatory. The parameter
:<code><nowiki>{{IPA symbol|ɡ͡b}}</nowiki></code> → {{IPA symbol|ɡ͡b}}▼
Use <code>output=</code> to specify the type of output.▼
:<code><nowiki>{{IPA symbol|t̪|output=name}}</nowiki></code> → {{IPA symbol|t̪|output=name}}▼
:<code><nowiki>{{IPA symbol|t̪|output=wikipage}}</nowiki></code> → {{IPA symbol|t̪|output=wikipage}}▼
:<code><nowiki>{{IPA symbol|t̪|output=soundfile}}</nowiki></code> → {{IPA symbol|t̪|output=soundfile}}▼
:<code><nowiki>{{IPA symbol|t̪|output=type}}</nowiki></code> → {{IPA symbol|t̪|output=type}}▼
▲Use <code>output=</code> to specify the type of the output: "name", "symbol", "article", or "audio".
▲
▲
* <code><nowiki>{{IPA symbol|w̥|output=symbol}}</nowiki></code> → {{IPA symbol|w̥|output=symbol}} (returns the primarily defined symbol)
Certain symbols such as the tie bars, length marks, and dotted circle in the input are ignored so long as the rest of the input matches a definition, so that the below do not result in errors even though these individual combinations are not defined in the data.
If no direct match is found, the template will then look for the earliest instance of a diacritic in the input string.
* <code><nowiki>{{IPA symbol|pʰæ̃}}</nowiki></code> → {{IPA symbol|pʰæ̃}}
* <code><nowiki>{{IPA symbol|pæ̃}}</nowiki></code> → {{IPA symbol|pæ̃}}
A two-character diacritic takes precedence over a one-character one should they be found at the same position.
Some symbols in the input are automatically replaced by the more suitable counterparts.
Pages with an error are listed in [[:Category:International Phonetic Alphabet pages needing attention]].▼
* <code><nowiki>{{IPA symbol|’|output=symbol}}</nowiki></code> (right single quotation mark) → {{IPA symbol|’|output=symbol}} ([[modifier letter apostrophe]])
==
The data is stored at [[Module:IPA symbol/data]]. It is divided into two groups: "sounds" and "diacritics". If no "article" is specified, the value for "name" will substitute it. A diacritic must be one or two Unicode characters. The data also stores substitution patterns for the input string.
▲* Its direct use is probably not too meaningful, but it can be useful inside other templates, e.g. {{tl|IPA link}}. It is a meta-template.
==Errors==
▲
* <code><nowiki>{{IPA symbol|xyz}}</nowiki></code> → {{IPA symbol|xyz}}
Optionally, an error text can be altered from the default message to any text by using the second parameter (if set to <code>blank</code>, the message will not appear at all). This cancels the addition of the error category.
▲
▲
* {{tl|IPA link}} – Displays an IPA symbol which is automatically linked to its sound article: β
* {{tl|IPAblink}} – As {{tlf|IPA link}}, enclosed in '''square brackets''': {{IPAblink|β}}
* {{tl|IPAslink}} – As {{tlf|IPA link}}, enclosed in '''slashes''': {{IPAslink|β}}
* [[:Category:International Phonetic Alphabet pages needing attention]]
{{IPA templates}}
{{collapse top|TemplateData}}
<templatedata>
{
"params": {
"1": {
"label": "Input symbol",
"example": "'m'",
"type": "string",
"required": true
},
"2": {
"label": "Error text",
"example": "blank",
"type": "string"
},
"output": {
"label": "Output type",
"example": "audio",
"type": "string"
}
}
}
</templatedata>
{{collapse bottom}}
<includeonly>{{sandbox other||
<!-- Categories below this line, please; interwikis at Wikidata -->
[[Category:IPA symbol templates]]
[[Category:Templates that add a tracking category]]
}}</includeonly>
|