Template:id-pr/documentation

From Wiktionary, the free dictionary
Jump to navigation Jump to search
Documentation for Template:id-pr. [edit]
This page contains usage information, categories, interwiki links and other content describing the template.

Introduction

[edit]

This template generates the ==Pronunciation== section of a Indonesian term, including the phonemic pronunciation, rhymes and syllabification, as well as (if manually specified) audio files and homophones.

This template is intended to replace the use of {{id-IPA}} along with {{rhymes}}, {{hyph}}, {{audio}} and similar templates specifying auxiliary pronunciation information. It uses the same respelling conventions as {{id-IPA}}, the main difference from its previous version is its use of Q for syllable-final glottal stops (formerly 7), which is based on the primary transliteration of the Jawi letter ق (which is transliterated as K in final position pronounced as glottal stop and on assimilated Arabic words in Malay in Latin script). It automatically generates the rhyme info as well as (if the respelling is similar to the page name) the syllabification info.

As of September 2024, the template has been stabilized and is ready for mass implementation, but there may still be bugs and missing features. If there are any issues or suggested improvements, please discuss them at Module talk:id-pronunciation.

Parameters

[edit]

Normally, call this template with no parameters, and it will automatically generate the pronunciation for the page name.

NOTE: The invocation of {{id-pr}} should occur on a line by itself. Do not put a bullet mark (*) before it. The bullet mark is generated by the template.

|1=, |2=, |3=, ...
Respellings. More than one comma-separated respelling can also be specified in a single parameter, and all such pronunciations will show on the same line, while respellings specified in separate parameters will show on different lines. There should be no space after the comma, or it will be treated as part of the respelling rather than a separator. Inline modifiers are used to specify things such as audio, manual syllabification, homophones, qualifiers and glosses. See below. Use + to stand for the pagename when specifying respellings. (If the only parameter is |1=+, it can be omitted.)
|syll=
One or more comma-separated manual syllabifications for the entire set of pronunciations. Use periods (dots) to separate syllables. There should be no space after the comma, or it will be treated as part of the syllabification rather than a separator. You can also specify per-respelling syllabifications using the <syll:...> inline modifier. If syllabification is not explicitly given, a default syllabification will be generated based on aligning the spelling in the pagename to the respelling; if that fails, no syllabification will be shown. Use |syll=+ to request that the pagename be syllabified anyway, according to the default algorithm. Use |syll=# to use the pagename itself as the syllabification. Use |syll=- to disable syllabification display. Inline modifiers can be attached to syllabifications; the recognized modifiers are exactly those documented below under #Nested inline modifiers for <syll:...>.
|rhyme=
One or more comma-separated manual rhymes for the entire set of pronunciations. There should be no space after the comma, or it will be treated as part of the rhyme rather than a separator. You can also specify per-respelling rhymes using the <rhyme:...> inline modifier. Use |rhyme=- to disable rhymes. Inline modifiers can be attached to rhymes; the recognized modifiers are exactly those documented below under #Nested inline modifiers for <rhyme:...>.
|hmp=
One or more comma-separated homophones for the entire set of pronunciations. There should be no space after the comma, or it will be treated as part of the homophone rather than a separator. You can also specify per-respelling homophones using the <hmp:...> inline modifier. Inline modifiers can be attached to homophones; the recognized modifiers are exactly those documented below under #Nested inline modifiers for <hmp:...>.
|audio=, |audio2=, ...
Audio file(s) for the entire set of pronunciations. The format of an audio file is <var>file</var>> or <var>file</var>#<var>gloss</var>> where gloss is the text displayed in the audio box and defaults to Audio. You can also specify per-respelling audio files using the <audio:...> inline modifier (to specify multiple audio files, use multiple inline modifiers one directly after another). Inline modifiers can be attached to audio files; the recognized modifiers are exactly those documented below under #Nested inline modifiers for <audio:...>.
|pagename=
Override the pagename used when + is specified and for syllabification. Normally only needed on test and documentation pages.

Inline modifiers

[edit]

Place inline modifiers directly after respellings to specify things such as audio, manual syllabification, homophones, qualifiers and glosses. The following inline modifiers are supported:

  • <q:...>: Qualifier to be placed to the left of a respelling. Such qualifiers can appear after any respelling, even when multiple comma-separated respellings appear on a line, and can be repeated, e.g. <q:...><q:...> to specify multiple left qualifiers.
  • <qq:...>: Qualifier to be placed to the right of a respelling. Such qualifiers can appear after any respelling, even when multiple comma-separated respellings appear on a line, and can be repeated, e.g. <qq:...><qq:...> to specify multiple right qualifiers.
  • <a:...>: One or more comma-separated accent qualifiers, specifying such things as nonstandard or colloquial. There should be no space after the comma, or it will be treated as part of the accent qualifier rather than a separator. If there are multiple respellings on a line, this inline modifier must come at the end. If multiple adjacent respellings have the same accent qualifiers, they are grouped, i.e. the accent qualifier is displayed once, and all respellings are indented underneath the accent qualifier.
  • <syll:...>: One or more comma-separated syllabifications. Use periods (dots) to separate syllables. There should be no space after the comma, or it will be treated as part of the syllabification rather than a separator. If there are multiple respellings on a line, this inline modifier must come at the end.
  • <rhyme:...>: One or more comma-separated manual rhymes for the respelling(s) on the line. There should be no space after the comma, or it will be treated as part of the syllabification rather than a separator. If there are multiple respellings on a line, this inline modifier must come at the end. Use <rhyme:-> to disable rhymes for the respelling(s) on the line.
  • <hmp:...>: One or more comma-separated homophones for the respelling(s) on the line. There should be no space after the comma, or it will be treated as part of the syllabification rather than a separator. If there are multiple respellings on a line, this inline modifier must come at the end.
  • <audio:...>: Audio file for the respelling(s) on the line. The format of an audio inline modifier is <audio:<var>file</var>> or <audio:<var>file</var>#<var>gloss</var>> where gloss is the text displayed in the audio box and defaults to Audio. Multiple audio files should be specified using multiple <audio:...> modifiers. (Commas aren't recognized because they sometimes occur in the filename itself, not followed by a space.) If there are multiple respellings on a line, this inline modifier must come at the end.
  • <t:...>: Gloss for the respelling(s) on the line. Multiple glosses should be specified using multiple <t:...> modifiers. Glosses are intended for definitions, to distinguish different pronunciations that share the same spelling. The format of a gloss is either <var>defn</var> or <var>pos</var>^<var>defn</var> or <var>pos</var>, where <var>pos</var> is a part of speech such as noun or adjective. Parts of speech can be abbreviated, e.g. n for noun, v for verb, a for adjective, adv for adverb, int for interjection, prep for preposition, conj for conjunction, etc. The full set of abbreviations is as described under Template:head#Part of speech. Multiple comma-separated parts of speech can be given, e.g. <n,int^> for a pronunciation that can be either a noun or an interjection, using the abbreviated gloss format described on the following line. It is recommended in the definition part of a gloss to use commas to separate synonyms and semicolons to separate distinct meanings. An example of this is <n^reach; power; offering, heirloom>.
  • <<var>pos</var>^<var>defn</var>> or <<var>pos</var>^>: If ^ is present, the t: prefix in the inline modifier can be omitted. Hence <a^blind> is equivalent to <t:a^blind>, and <n,int^> is equivalent to <t:n,int^>.

Nested inline modifiers

[edit]

The inline modifiers <syll:...>, <rhyme:...>, <hmp:...> and <audio:...> can themselves have (nested) inline modifiers. For example, the following is allowed:

{{id-pr|sau.dara<syll:sau.da.ra<cap:Hyphenation>>}}

This overrides the default caption used for the syllabification line, changing it from Syllabification to Hyphenation.

Another example is

{{id-pr|tidaq}}

In general, all modifiers that accept nested modifiers accept the following:

  • <q:...>: Qualifier to be placed to the left of an individual syllabification, rhyme, homophone or audio file. Such qualifiers can appear after any syllabification, rhyme or homophone, even when multiple such values appear in a single modifier and can be repeated, e.g. <q:...><q:...> to specify multiple left qualifiers. (Commas aren't recognized specially, but in practice there's hardly any difference between multiple qualifiers specified comma-separated with a space after the comma, and multiple qualifiers specified using the <q:...><q:...> syntax.)
  • <qq:...>: Qualifier to be placed to the right of an individual syllabification, rhyme, homophone or audio file. Works just like <q:...> but appears to the right rather than the left of the item being qualified.
  • <a:...>: Accent qualifier to be placed to the left of an individual syllabification, rhyme, homophone or audio file. These accent qualifiers work exactly like regular qualifiers (rather than like the <a:...> accent qualifier attached to a respelling); the only difference from regular qualifiers is that the values of the qualifiers are those that are accepted by {{a}} (in practice, arbitrary text is accepted, but certain values specifying accents are linked appropriately, and certain aliases are converted to canonical values when linking).
  • <aa:...>: Accent qualifier to be placed to the right of an individual syllabification, rhyme, homophone or audio file. Works just like <a:...> but appears to the right rather than the left of the item being qualified.

In addition, <syll:...> accepts the following additional modifier:

  • <cap:...>: Override the caption (normally Syllabification). If there are multiple syllabifications in a single modifier, this nested modifier must come at the end.

In addition, <hmp:...> accepts the following additional modifiers (all of which can be placed after any individual homophone, and do not need to come at the end):

  • <t:...> or <gloss:...>: Gloss (meaning) for an individual homophone. Works like the |t= or |gloss= param of {{l}} and {{m}}. Not the same as the <t:...> inline modifier specified to respellings.
  • <pos:...>: Part of speech for an individual homophone. Works like the |pos= param of {{l}} and {{m}}. Not the same as the <var>pos</var> portion of the <t:...> inline modifier specified to respellings (although similar abbreviations are accepted).
  • <lit:...>: Literal meaning for an individual homophone. Works like the |lit= param of {{l}} and {{m}}.
  • <alt:...>: Alternative display text for an individual homophone. Works like the |alt= param of {{l}} and {{m}}. Rarely needs to be given.
  • <id:...>: Sense ID for an individual homophone. Works like the |id= param of {{l}} and {{m}}.
  • <g:...>: One or more comma-separated gender-number specifications for an individual homophone, such as m for masculine or f-p for feminine plural. Works like the |g=, |g2=, ... params of {{l}} and {{m}}.

In addition, <rhyme:...> accepts the following additional modifier:

  • <s:...>: Override the number of syllables for an individual rhyme. The value is one or more comma-separated numbers, such as 2 or 4,5. This controls the generation of categories like Category:Rhymes:Indonesian/aman/2 syllables. If a manual rhyme is given but the associated modifier specifying the number of syllables is omitted, the code attempts to derive the number of syllables from the syllabification (if available) or the generated phonemic pronunciation; if both of these fail, no per-syllable category will be generated.

<audio:...> does not accept any additional modifiers other than the qualifiers and accent qualifiers mentioned above.

Syllabifications

[edit]

If syllabification is not explicitly given, the code attempts to align the auto-generated syllabified respelling to the spelling of the pagename to produce a syllabification of the pagename.

If multiple lines of pronunciations are present, and all lines produce the same syllabification(s), the overall value(s) will be displayed unindented, below all pronunciations. Otherwise, each line gets its own syllabification, indented underneath the line in question.

If the alignment process fails, no syllabification will be displayed unless manually provided. To do this, specify the syllabification using |syll= (overall syllabification) or the <syll:...> inline modifier (per-line syllabification). Possible values are one or more comma-separated syllabifications, with dots (.) separating syllables; + to request default syllabification of the pagename; # to use the pagename itself as the syllabification; and - to disable syllabification. For example, for 1 Tawarikh (1 Chronicles), the respelling Tawarikh pertama cannot be aligned with the spelling because ⟨1⟩ and pertama can't be aligned. In this case, specify either |syll=1 Ta.wa.rikh or simply |syll=+, which gives the same result. |syll=# is useful in cases like Hong Kong (Hong Kong).

Examples

[edit]

Quick reference

[edit]
Page Example Comment
bahasa {{id-pr}} Most of the time, no parameters are needed.
rakyat {{id-pr|raqyat}} Substitute K pronounced as final glottal stop in syllable ending with Q.
besar {{id-pr|besar}} E is rendered as schwa by default (use É or È if pronounced /e/ or /ɛ/)
cabai {{id-pr|cabai|cabé<a:colloquial>}} multiple pronunciations, with accent qualifiers.
hidung {{id-pr}} /u/ in final closed syllables is usually lowered to [ʊ].
pilih {{id-pr}} /i/ in final closed syllables is usually lowered to [ɪ].
presiden {{id-pr|présidèn}} Use É or È where ⟨e⟩ is pronounced /e/ or /ɛ/. Usually in loanwords, but also occurs in some native vocabulary (e.g. leher, merah).
saudara {{id-pr|sau.dara}} Use a period to force the correct pronunciation of an in-word diphthong

Foreign sounds

[edit]
Page Example Comment
fakta {{id-pr|fakta}} Indonesian F (in loanwords) is kept in standard pronunciation.
Al-Qur'an {{id-pr|Al-Kur.ān}} Where a term is spelled is an Q (in loanwords and proper nouns), substitute it with K (Q is used for glottal stops).
universitas {{id-pr|universitas}} Indonesian V (in loanwords) is usually pronounced [f] in speech.

Multiple-word expresions

[edit]
Page Example Comment
apa kabar {{id-pr|apa kabar}}
Tahun Baru {{id-pr}}