Next, add some title elements. Select the hymn element and select Insert / Element / Child. Set the element name to “title” and the element value to “Majesty”. Add an attribute (Insert / Attribute / Child) named “lang” with value “en”, and another attribute (Insert / Attribute / After) named “main” with value “true”. The hymn now has an English title that is also the main title for the hymn, and the file looks like this:
Add another title. Select the title element and insert another element named “title” with value “Majestad”. Add an attribute “lang” with value “es” and an attribute “main” with value “true”. The hymn now has both an English and a Spanish main title. The file looks like this:
Finally, add a third title. Add an element named “title” with value “Worship His Majesty”. Add an attribute “lang” with value “en” (but no main attribute). Now the hymn has a main title in both English (language code “en”) and Spanish (language code “es”), plus an additional English title. The file looks like this:
Hymn titles with the main attribute are displayed briefly when the user enters a hymn number, and displayed continuously while in Demo mode. Hymn titles also allow the user to do an alphabetical search. If a hymn has no titles at all, no title will be displayed during entry or demo and the hymn won’t be searchable.
You can add titles in as many languages as you like. If the hymn has a main title in the language selected by the user, then Gloria will display that title. If there is no matching title language, Gloria will display the first main title in the list (English in this example). So make the first title your default title and then add additional languages as required. Note that the title language doesn’t even have to be a language supported by Gloria, although it does have to conform to the character set supported by Gloria (unsupported characters will display as *, see Title Element (Hymnbook) for the table of supported characters). Gloria will set the first title in each language to be a main title if there is no explicitly designated main title. If more than one title in the same language is designated as main, later titles will replace earlier titles as main.
Typically there is one title per hymn, in the language of the hymnbook. That title is tagged as main. Add other main titles in additional languages if desired. Adding more titles beyond the main title(s) helps users doing an alphabetical search. Only the main title is displayed during hymn entry or demo, but all titles are used for alphabetical search. Additional titles are often titles the hymn is commonly known by, though different from the official title. Sometimes an additional title is the start of the chorus, as something the user is more familiar with. Or the start of the first verse (if different from the official title), or the start of other verses, or the name of the tune (often capitalized). Adding more titles makes the hymn easier to search for. In the example above, the user would find hymn #1 when searching under “M” or under “W” if Gloria is set to English. The user would only find hymn #1 under “M” if Gloria is set to Spanish.
Titles are limited to 280 characters. Titles longer than the 20 characters of the Gloria screen will be scrolled the full length once, followed by a fixed display of the first 20 characters. Titles on the search screen are never scrolled. So main titles benefit from including the complete title (you don’t have to truncate or abbreviate) but keep the secondary titles brief. Unicode accented characters are supported. See the table of supported characters.
Title elements must be child elements of a hymnbook element or a hymn element. When part of a hymn element, the hymn must have a valid num attribute.
See Title Element (Hymnbook) for the lang attribute.
The “main” attribute is optional. Include it and set its value to “true” to flag a hymn title as the main title for that hymn in that language. A hymn should only have one main title per language. If more than one title in the same language is designated as main, later titles will replace earlier titles as main.
Any value for the main attribute other than “true” is interpreted as false. This has the same effect as not including the main attribute at all.
The main attribute is only allowed in the title element within a hymn element.