As a CMML file is an XML file by definition, the xml processing instruction provides for a file-specific specification of the encoding format in its "encoding" tag. A potentially differing character set for an INPUT media file will be specified in the "contenttype" attribute of the source tag as a parameter to the MIME type.
Different languages and their directionality for display purposes are given for every tag that contains human-readable text as a value of either an attribute or a tag. They are specified in the lang and dir attributes.
The root cmml tag's "lang" and "dir" attributes provide the default language for the whole CMML file.
The source tag in the stream tag has i18n support as its "title" attribute may contain human readable text.
The head tag has i18n support to provide a default language to its contained tags such as the title and meta tags. Both of them may incidentally overrun the defaults by having a language specification of their own.
The clip tag again contains a default language for the clip itself. The a, img, desc, and meta tags may each override the default language.
Here is an example of a multi-lingual CMML file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!DOCTYPE cmml SYSTEM "cmml.dtd"> <cmml lang="pl"> <stream timebase="npt:0"> <import contenttype="video/mpeg" src="fish.mpg" start="npt:0"/> </stream> <head lang="en"> <title>Types of fish</title> <meta name="Producer" content="Joe Ordinary"/> <meta name="DC.Author" content="Joe's friend"/> </head> <clip lang="de" id="intro" start="npt:0"> <a href="http://www.blah.au/fish.html">Lesen Sie mehr über Fische.</a> <desc lang="en">This is the introduction to the film Joe made about fish.</desc> </clip> <clip lang="en" id="goldfish" start="npt:5:5.9"> <a href="http://www.blah.au/morefish.anx?id=goldfish">More video clips on goldfish.</a> <img src="http://www.blah.au/goldfish.jpg"/> <desc>Joe has a fishtank at home with many colourful fish. The common goldfish is one of them and Joe's favourite. Here are some fabulous pictures he has taken of them.</desc> <meta name="Location" content="Joe's fishtank"/> <meta name="Subject" content="goldfish"/> <meta lang="fr" name="sujet" content="poisson d'or"/> </clip> </cmml>
The document is generally in Polish (see lang attribute of cmml tag). The lang atttribute of the head tag makes all head tags and attributes be English. The lang attribute of the first clip tag makes all of them be German, though this is overrun by the lang attribute of the desc tag, making that one English. The last clip tag is in English, but it has a meta tag in French.