Template:IPA-en: Difference between revisions

From Alternate History Worlds
Jump to navigation Jump to search
(Created page with "<onlyinclude><small>{{#switch: {{{2}}}|IPA=IPA: |lang=English: |pron=pronounced |UK=UK: |US=US: |local=locally |=|English pronunciation: }}<...")
 
No edit summary
 
Line 1: Line 1:
<onlyinclude><small>{{#switch: {{{2}}}|IPA=IPA:&nbsp;|lang=English:&nbsp;|pron=pronounced&nbsp;|UK=UK:&nbsp;|US=US:&nbsp;|local=locally&nbsp;|=|English pronunciation:&nbsp;}}</small><span title="Pronunciation in IPA" class="IPA">[[WP:IPA for English|/{{{1}}}/]]</span><small>{{#if:{{{3|}}}|&nbsp; {{nowrap|([[File:Speaker Icon.svg|13px|link=|alt=]] [[:Media:{{{3|}}}|listen]])}}}}</small></onlyinclude>
<onlyinclude><small>{{#switch: {{{2}}}|IPA=IPA:&nbsp;|lang=English:&nbsp;|pron=pronounced&nbsp;|UK=UK:&nbsp;|US=US:&nbsp;|local=locally&nbsp;|=|English pronunciation:&#32;}}</small>{{IPA|[[Help:IPA for English|/{{{1}}}/]]}}{{#if:{{{3|}}}|{{IPA audio link|{{{3}}} }} }}</onlyinclude>
{{documentation}}
{{documentation}}
==Usage==
This template formats IPA transcriptions and links them to [[WP:IPA for English]]. The transcription should match the conventions of that key; for narrower dialect transcriptions, use {{tl|IPA-all}}, which links to a more complete IPA key.
The first cell in the template is for the transcription, and a second optional cell is a switch that controls the lede. With no second value, the lede ''English pronunciation:'' appears:
*<code><nowiki>{{IPA-en|n}}</nowiki></code> → {{IPA-en|n}}
*<code><nowiki>{{IPA-en|n|pron}}</nowiki></code> → {{IPA-en|n|pron}}
*<code><nowiki>{{IPA-en|n|lang}}</nowiki></code> → {{IPA-en|n|lang}}
*<code><nowiki>{{IPA-en|n|local}}</nowiki></code> → {{IPA-en|n|local}}
*<code><nowiki>{{IPA-en|n|IPA}}</nowiki></code> → {{IPA-en|n|IPA}}
*<code><nowiki>{{IPA-en|n|US}}</nowiki></code> → {{IPA-en|n|US}}
*<code><nowiki>{{IPA-en|n|UK}}</nowiki></code> → {{IPA-en|n|UK}}
*<code><nowiki>{{IPA-en|n|}}</nowiki></code> → {{IPA-en|n|}}
Any of these may be combined with a sound file in an optional third cell:
*<code><nowiki>{{IPA-en|n|local|En-us-'n'.ogg}}</nowiki></code> → {{IPA-en|n|local|En-us-'n'.ogg}}
For the default lede, however, a placeholder such as ‹-› is required in the second cell:
*<code><nowiki>{{IPA-en|n|-|En-us-'n'.ogg}}</nowiki></code> → {{IPA-en|n|-|En-us-'n'.ogg}}
The similar template {{tl|pron-en}} has no lede switch:
*<code><nowiki>{{pron-en|n}}</nowiki></code> → {{pron-en|n}}
*<code><nowiki>{{pron-en|n|En-us-'n'.ogg}}</nowiki></code> → {{pron-en|n|En-us-'n'.ogg}}
{{usage of IPA templates}}
<!-- PLEASE ADD CATEGORIES BELOW THIS LINE, THANKS. -->
[[simple:Template:IPA-en]]
[[Category:IPA templates|{{PAGENAME}}]]
<!-- PLEASE ADD INTERWIKIS BELOW THIS LINE, THANKS. -->

Latest revision as of 09:42, 30 December 2016

English pronunciation: /{{{1}}}/ Template:Documentation