Applies to: Protocol and format interpretation for developers inspecting authorized media delivery.

The useful distinctions

  • XMLTV permits repeated title elements with language annotations.
  • The language element describes programme language.
  • Its own lang attribute identifies the language used to write that description.

Make a text-variant collection

The sample has two title values for the same scheduled item. Store them as two annotated strings instead of keeping whichever element happened to arrive last. The programme's language description is written in English but says Urdu. That is not a contradiction: one field describes the language of a label and another describes the content. A schema that reduces every lang occurrence to one programme-level column loses this distinction and can make an English title appear to establish an English soundtrack.

Avoid unsupported fallback promises

An importer may choose an editorial fallback order for missing translations, but that order belongs to the application contract. The format's ability to carry alternate strings does not prove that every receiving interface will present them in the same order. A useful review exports a ledger of element name, annotation, text, and position so omissions remain visible. Preserve unannotated values as unannotated rather than guessing from script: Latin text can contain many languages, and names can appear unchanged across translations. When comparing successive files, match language and field before comparing text. A changed English description should not erase the Urdu description or alter the separately supplied programme language.

Worked example · synthetic

There are two localized titles and one programme-language description. The lang='en' on language labels the word Urdu; it does not turn the described programme language into English.

Synthetic text example; no network operation has been performed.

<tv>
  <programme start="20261108100000 +0000" channel="workshop.example">
    <title lang="en">The Indigo Workshop</title>
    <title lang="ur">نیل کی ورکشاپ</title>
    <desc lang="en">A demonstration using paper and dye.</desc>
    <language lang="en">Urdu</language>
  </programme>
</tv>

Check the interpretation

  • Preserve repeatable text fields as collections.
  • Keep field language and programme language in distinct columns.
  • Record fallback rules as application decisions.