Sjabloon:IPA/doc
Bestand:OOjs UI icon book-ltr.svg | This is a documentation subpage for Sjabloon:IPA. It contains usage information, categories and other content that is not part of the original sjabloon page. |
Bestand:Edit-copy purple-wikit.svg | This project or template has a transwiki guide to help editors adapt it to a remote wiki when this cannot be done by simply copying the codes of one single template. See Sjabloon:IPA/doc/Transwiki guide for instructions. |
Bestand:Ambox warning yellow.svg | This template is used on approximately 80.000 pages, so changes to it will be widely noticed. Please test any changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Please consider discussing changes on the talk page before implementing them. |
Usage
Template:IPA is useful when there are multiple instances of the International Phonetic Alphabet (IPA) on a page. It contains
<span title="Representation in the International Phonetic Alphabet (IPA)" class="IPA">{{{1}}}</span>
This means it specifies a class called "IPA" as a hook for CSS styling and DOM scripting. This allows for assigning specific fonts to display IPA characters. Registered Wikipedia users can specify their own fonts for IPA text by editing their user style sheet, e.g. Special:MyPage/common.css. Users can also edit their global stylesheet (meta:Special:MyPage/global.css), which works across all projects. MediaWiki:Common.css also ensures that links inside IPA transcriptions marked up with this template do not use underlines since these carry special semantics there. For instance, the following code would cause IPA to be displayed in the font Charis SIL: <syntaxhighlight lang="css"> .IPA { font-family: Charis SIL; }</syntaxhighlight>
TemplateData
TemplateData for IPA
<templatedata>{ "description": "This template ensures proper display of transcriptions using the International Phonetic Alphabet (IPA), especially in older operating systems and browsers. There are related specialized templates that also semi-automatically generate the transcription itself.", "params": {
"1": { "label": "transcription", "description": "including square brackets [...] for phonetic transcriptions or enclosing forward slashes /.../ for phonemic ones", "type": "string", "required": true }
}}</templatedata>
Examples
Placing a phonemic rendering of the word characters in Template:IPA:
{{IPA|/ˈkærəktɚz/}} {{IPA|/[[character|ˈkærəktɚz]]/}}
The result will be a span with a class attribute, like this:
<span title="Representation in the International Phonetic Alphabet (IPA)" class="IPA">/ˈkærəktɚz/</span>
Which appears in your browser as:
- /ˈkærəktɚz/
- /ˈkærəktɚz/
Without template:IPA:
- /ˈkærəktɚz/
- /ˈkærəktɚz/
These sets may look different if you have a custom font defined for IPA text.
Please place all IPA text into the template, even if it doesn't have any special IPA characters, like this: /mi/. This will allow users to format all examples of IPA text consistently, with their choice of fonts, colours, etc.
Usage of IPA pronunciation templates
Wikipedia offers several templates for proper display of IPA transcriptions.
IPA font
In general, IPA symbols on a page should be enclosed in the {{IPA}} template, which formats the text in an IPA-producing font. If a substantial portion of a page uses IPA, it is customary to post notice of that fact with {{IPA notice}}, though each token still requires the {{IPA}} template for proper formatting.
If there are not enough occurrences to warrant a notice, then consider a template that links to an IPA key for the first instance of the IPA on a page or section.
English words
For English words, in a broad, non-regional transcription, as when giving the pronunciation of a key word in an article, use {{IPAc-en}}, which links to Help:IPA/English, a chart of the subset of the IPA that is relevant to English, and automates the conversion to IPA, so that {{IPAc-en|'|w|3:r|d}}
appears as /ˈwɜːrd/. This provides mouse-over links to the symbols, and is now the preferred template.
For a specific transcription in a regional variety, use {{IPA-endia}} or {{IPA-all}}.
Non-English words
For words that are not assimilated into English, regional pronunciations of English words, and non-standard English dialects, use templates linking to the more general Help:IPA chart, containing all major IPA symbols:
- {{IPA-all}}, appearing as: IPA: [word]. Or:
- For specific languages, there may be dedicated IPA keys for standardized transcription. There are several options for their display. The first cell includes the ISO code of the language; the second is the transcription; the third keys an introductory phrase; and the fourth is space for a sound file. Using the French word eau [o] as an example, we have the default format:
{{IPA-fr|o}}
→ French pronunciation: [o]
- Or the word "pronounced" can be used as the introduction:
{{IPA-fr|o|pron}}
→ pronounced [o]
- Language name only:
{{IPA-fr|o|lang}}
→ French: [o]
- "IPA" only:
{{IPA-fr|o|IPA}}
→ IPA: [o]
- Link only:
{{IPA-fr|o|}}
→ [o]
- Any of these may be combined with a sound file:
{{IPA-fr|o|lang|Fr-eau.ogg}}
→ French: [o] (Sjabloon:Error-smallSjabloon:Namespace detect)
- For the default introductory phrase, however, a placeholder such as “-” is required:
{{IPA-fr|o|-|Fr-eau.ogg}}
→ French pronunciation: [o] (Sjabloon:Error-smallSjabloon:Namespace detect)
Languages without dedicated keys
Templates have been created for languages which do not yet have dedicated key pages. Transcriptions which use these templates will link to Help:IPA for the time being; when a language-specific key is created the templates will be linked accordingly. For example, you can use {{IPA-jv|word}} for Javanese, but for the moment it will link to Help:IPA, producing Javanese pronunciation: [word].
Languages and language extensions (IPA-xx) with links to Help:IPA
|
---|
|
Conversion to IPA
The template {{x2i}} takes X-SAMPA symbols (ASCII equivalents of IPA symbols) and converts them to IPA.
Other language-specific templates allow you to enter ordinary letters (or conventional ASCII equivalents) in place of IPA characters, and they will be automatically converted to the phonetic symbols that are used to transcribe the language. The templates that are currently available are shown below, with examples:
Language | Template | Code example | Result |
---|---|---|---|
Arabic | {{IPAc-ar}} | {{IPAc-ar|2|a|l|l|u|gh|a|t_|a|l|3|a|r|a|b|i|y|y|a}}
|
[ʔalluɣat‿alʕarabijja] |
Cantonese | {{IPAc-yue}} | {{IPAc-yue|h|ung|2|.|z|i|2}}
|
[hǒŋ.tsǐː] |
English | {{IPAc-en}} | {{IPAc-en|,|{|l|@|'|b|{|m|@}}
|
/ˌæləˈbæmə/ |
French | {{IPAc-fr}} | {{IPAc-fr|j|@|-|s|U|i|s_|a|m|é|r|i|c|ain}}
|
[jə sɥi.z‿ameʁikɛ̃] |
Georgian | {{IPAc-ka}} | {{IPAc-ka|dz|a|l|a|_|e|r|t|o|b|a|sh|i|a}}
|
[d͡zɑlɑ ɛrtʰɔbɑʃiɑ] |
Hebrew | {{IPAc-he}} | {{IPAc-he|y|a|ʿ|a|k|o|v}}
|
[jaʕakov] |
Hungarian | {{IPAc-hu}} | {{IPAc-hu|'|m|a|gy|a|r}}
|
[ˈmɒɟɒr] |
Irish | {{IPAc-ga}} | {{IPAc-ga|'|b|ai|l'|@|-|'|á|th|@|-|'|c'|l'|ia|th}}
|
[ˈbˠalʲə ˈaːhə ˈclʲiəh] |
Italian | {{IPAc-it}} | {{IPAc-it|'|ì|o|_|'|s|o|:|n|o|_|a|m|e|r|i|'|c|a|:|n|o}}
|
[ˈio ˈsoːno ameriˈkaːno] |
Japanese | {{IPAc-ja}} | {{IPAc-ja|ku|ro|si|o}}
|
[kɯɾoɕio] |
Korean | {{IPAc-ko}} | {{IPAc-ko|h|a|ng|eo}}
|
[haːŋəː] |
Mandarin | {{IPAc-cmn}} | {{IPAc-cmn|zh|ong|1|h|ua|2|-|r|en|2|m|in|2|-|g|ong|4|h|e|2|g|uo|2}}
|
[ʈʂʊ́ŋxwǎ ɻə̌nmǐn kʊ̂ŋxɤ̌kwǒ] |
Māori | {{IPAc-mi}} | {{IPAc-mi|ng|ā|r|u|a|'|w|ā|h|i|a}}
|
[ŋaːɾʉaˈwaːhia] |
Marshallese | {{IPAc-mh}} | {{IPAc-mh|m|yay|J|^yeh|r|how|ow}}
|
[mʲæzʲ(ɛ͡ʌ)rˠɤ͡oo̯] |
Polish | {{IPAc-pl}} | {{IPAc-pl|'|sz|cz|e|ć|i|n}}
|
[ˈʂt͡ʂɛt͡ɕin] |
Portuguese | {{IPAc-pt}} | {{IPAc-pt|p|o|<|r|t|u|'|g|a|l|lang=pt}} and {{IPAc-pt|b|r|a|'|S|i|l|lang=br}}
|
[puɾtuˈɣaɫ] and [bɾaˈziw] |
Romanian | {{IPAc-ro}} | {{IPAc-ro|ˈ|m|U|n|ț|ii|_|f|ă|G|ă|ˈ|r|a|ș|U|l|U|i}}
|
[ˈmuntsij fəɡəˈraʃului] |
Spanish | {{IPAc-es}} | {{IPAc-es|m|i|'|gu|e|l|_|d|e|_|c|e|r|'|v|a|n|t|e|s|_|s|aa|'|v|e|d|r|a}}
|
[miˈɣel ðe θeɾˈβantes saːˈβeðɾa] |
The following templates have also been created, but they haven't been vetted by the community and may not work properly:
- {{IPAc-ang}}: Old English
- {{IPAc-de}}: German
- {{IPAc-la}}: Latin
- {{IPAc-nl}}: Dutch
- {{IPAc-uk}}: Ukrainian
See also
- {{Respell}}, for pronunciation respellings, which may be used for English words in addition to the IPA
- {{Lang-nci-IPA}}, for dual Nahuatl-IPA transcription