protected function addRootNodes(\DOMDocument $dom, $targetLanguage = null)
    {
        $xliff = $dom->appendChild($dom->createElement('xliff'));
        $xliff->appendChild(new \DOMAttr('xmlns', 'urn:oasis:names:tc:xliff:document:1.2'));
        $xliff->appendChild(new \DOMAttr('version', '1.2'));

        $fileNode = $xliff->appendChild($dom->createElement('file'));
        $fileNode->appendChild(new \DOMAttr('source-language', 'en'));
        $fileNode->appendChild(new \DOMAttr('datatype', 'plaintext'));
        $fileNode->appendChild(new \DOMAttr('original', 'file.ext'));

        if (!is_null($targetLanguage)) {
            $fileNode->appendChild(new \DOMAttr('target-language', $targetLanguage));
        }

        $bodyNode =  $fileNode->appendChild($dom->createElement('body'));

        return $bodyNode;
    }