Language list atom ('lang')
An atom that lists items that are suitable for more than one language.
Overview
When one or more items must be identified as being suitable for more than one language, each list of languages is stored in this otherwise optional atom. The language list atom is a full atom with an atom type of ‘lang’.
Each list starts with a 2-byte count of the number of items in the list, and then each ISO 639-2/T code, packed into two bytes, according to the ISO Language Code definition in the MP4 specification.
The atom consists of a count of the number of lists, expressed as a 32-bit integer, and then these lists, appended end-to-end.
Note that:
Indexes into the Language List atom are 1-based.
Zero (0) is reserved and never used as an index.
Currently, there is a limit of 255 languages that may be recorded in a Language List atom.
The following table shows an example Language List atom consisting of two language lists with three and two languages, respectively.
Field size | Field | Field contents | Comment |
|---|---|---|---|
32-bit | atom_size | 26 | Size of this language list atom in bytes. |
32-bit | atom_type |
| |
32-bit | entry_count | 2 | Number of language lists. |
16-bit | language_count | 3 | Number of languages in language list 1. |
16-bit | language | 5575 | Packed ISO code for ‘eng’ (English) |
16-bit | language | 6721 | Packed ISO code for ‘fra’ (French) |
16-bit | language | 4277 | Packed ISO code for ‘deu’ (German) |
16-bit | language_count | 2 | Number of languages in language list 2. |
16-bit | language | 19969 | Packed ISO code for ‘spa’ (Spanish) |
16-bit | language | 16882 | Packed ISO code for ‘por’ (Portuguese) |