Template:tl-pr/documentation

Introduction
This template generates the ==Pronunciation== section of a Tagalog 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 tl-IPA along with rhymes, hyph, audio and similar templates specifying auxiliary pronunciation information. It uses the same respelling conventions as tl-IPA, but automatically generates the rhyme info as well as (if the respelling is similar to the page name) the syllabification info.

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

NOTE: The invocation of 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 +, it can be omitted.)


 * syll
 * One or more comma-separated manual syllabifications for the entire set of pronunciations. Use periods (dots) to separate syllables, e.g. for the name . 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  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 + to request that the pagename be syllabified anyway, according to the default algorithm. Use # to use the pagename itself as the syllabification, e.g. with . Use - to disable syllabification display. Inline modifiers can be attached to syllabifications; the recognized modifiers are exactly those documented below under  for.


 * 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 inline modifier. Use - to disable rhymes. Inline modifiers can be attached to rhymes; the recognized modifiers are exactly those documented below under  for.


 * 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 inline modifier. Inline modifiers can be attached to homophones; the recognized modifiers are exactly those documented below under  for.


 * audio, audio2, ...
 * Audio file(s) for the entire set of pronunciations. The format of an audio file is or  where gloss is the text displayed in the audio box and defaults to . You can also specify per-respelling audio files using the  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  for.


 * pagename
 * Override the pagename used when is specified and for syllabification. Normally only needed on test and documentation pages.

Inline modifiers
Place inline modifiers directly after respellings to specify things such as audio, manual syllabification, homophones, qualifiers and glosses. The following inline modifiers are supported:
 * : 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. to specify multiple left qualifiers.
 * : 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. to specify multiple right qualifiers.
 * : One or more comma-separated accent qualifiers, specifying such things as or . 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.
 * : One or more comma-separated syllabifications, e.g. or . 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.
 * : 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 to disable rhymes for the respelling(s) on the line.
 * : 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 file for the respelling(s) on the line. The format of an audio inline modifier is or  where gloss is the text displayed in the audio box and defaults to . Multiple audio files should be specified using multiple  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.
 * : Gloss for the respelling(s) on the line. Multiple glosses should be specified using multiple modifiers. Glosses are intended for definitions, to distinguish different pronunciations that share the same spelling. The format of a gloss is either  or  or, where  is a part of speech such as  or . Parts of speech can be abbreviated, e.g.  for noun,  for verb,  for adjective,  for adverb,  for interjection,  for preposition,  for conjunction, etc. The full set of abbreviations is as described under Template:head. Multiple comma-separated parts of speech can be given, e.g.  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.
 * or : If is present, the  prefix in the inline modifier can be omitted. Hence  is equivalent to, and  is equivalent to.

Nested inline modifiers
The inline modifiers, , and  can themselves have (nested) inline modifiers. For example, the following is allowed:

Kokya>

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

Another example is

gawâ-gawâ>

This adds a left qualifier to the audio line, indicating that this audio file contains glottal stop elision.

In general, all modifiers that accept nested modifiers accept the following:
 * : 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. 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  syntax.)
 * : Qualifier to be placed to the right of an individual syllabification, rhyme, homophone or audio file. Works just like but appears to the right rather than the left of the item being qualified.
 * : 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 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).
 * : Accent qualifier to be placed to the right of an individual syllabification, rhyme, homophone or audio file. Works just like but appears to the right rather than the left of the item being qualified.

In addition, accepts the following additional modifier:
 * : Override the caption (normally ). If there are multiple syllabifications in a single modifier, this nested modifier must come at the end.

In addition, accepts the following additional modifiers (all of which can be placed after any individual homophone, and do not need to come at the end):
 * or : Gloss (meaning) for an individual homophone. Works like the t or gloss param of l and m. Not the same as the inline modifier specified to respellings.
 * : Part of speech for an individual homophone. Works like the pos param of l and m. Not the same as the portion of the  inline modifier specified to respellings (although similar abbreviations are accepted).
 * : Literal meaning for an individual homophone. Works like the lit param of l and m.
 * : Alternative display text for an individual homophone. Works like the alt param of l and m. Rarely needs to be given.
 * : Sense ID for an individual homophone. Works like the id param of l and m.
 * : One or more comma-separated gender-number specifications for an individual homophone, such as for masculine or  for feminine plural. Works like the g, g2, ... params of l and m.

In addition, accepts the following additional modifier:
 * : Override the number of syllables for an individual rhyme. The value is one or more comma-separated numbers, such as or . This controls the generation of categories like Category:Rhymes:Tagalog/aliw/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.

does not accept any additional modifiers other than the qualifiers and accent qualifiers mentioned above.

Syllabifications
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. For example, for, given the respelling and its automatic syllabification , the code will generate the pagename syllabification. In this case the process simply involves ignoring the diacritics, but some cases are more complex. For example: 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.
 * the code handles extra 's (glottal stops) in the respelling, matching with its respelling  to produce ;
 * the code handles $⟨j⟩$ and $⟨g⟩$ replaced in respelling by, as well as extra 's and 's inserted in the respelling, matching with its respelling  to produce ;
 * the code handles respellings of $⟨n⟩$ with, matching with its respelling  (where $⟨g⟩$ has been respelled with ) to produce ;
 * the code handles silent double letters and $⟨h⟩$'s, matching with its respelling  to produce ;
 * the code handles $⟨i⟩$ respelled with and $⟨u⟩$ respelled with $⟨w⟩$, matching  with its respelling  (also with silent $⟨h⟩$ and double $⟨l⟩$) to produce ;
 * etc.

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 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, the respelling cannot be aligned with the spelling because $⟨1⟩$ and  can't be aligned. In this case, specify either 1 Cro.ni.ca or simply +, which gives the same result. # is useful in cases like and. (In the former case, for example, + would incorrectly produce .)