Translation/Exporter/XliffExporter.php
protected function createTranslationNode(\DOMDocument $dom, $id, $key, $value)
    {
        $translationNode = $dom->createElement('trans-unit');
        $translationNode->appendChild(new \DOMAttr('id', $id));
        
        /**
         * @see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#approved
         */
        if ($value != '') {
            $translationNode->appendChild(new \DOMAttr('approved', 'yes'));
        }

        $source = $dom->createElement('source');
        $source->appendChild($dom->createCDATASection($key));
        $translationNode->appendChild($source);

        $target = $dom->createElement('target');
        $target->appendChild($dom->createCDATASection($value));
        $translationNode->appendChild($target);

        return $translationNode;
    }
protected function createTranslationNode(\DOMDocument $dom, $id, $key, $value)
    {
        $translationNode = $dom->createElement('trans-unit');
        $translationNode->appendChild(new \DOMAttr('id', $id));
        
        /**
         * @see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#approved
         */
        if ($value != '') {
            $translationNode->appendChild(new \DOMAttr('approved', 'yes'));
        }

        $source = $dom->createElement('source');
        $source->appendChild($dom->createCDATASection($key));
        $translationNode->appendChild($source);

        $target = $dom->createElement('target');
        $target->appendChild($dom->createCDATASection($value));
        $translationNode->appendChild($target);

        return $translationNode;
    }
protected function createTranslationNode ( \ DOMDocument $ dom , $ id , $ key , $ value ) { $ translationNode = $ dom -> createElement ( 'trans-unit' ) ; $ translationNode -> appendChild ( new \ DOMAttr ( 'id' , $ id ) ) ; /**
         * @see http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#approved
         */ if ( $ value != '' ) { $ translationNode -> appendChild ( new \ DOMAttr ( 'approved' , 'yes' ) ) ; } $ source = $ dom -> createElement ( 'source' ) ; $ source -> appendChild ( $ dom -> createCDATASection ( $ key ) ) ; $ translationNode -> appendChild ( $ source ) ; $ target = $ dom -> createElement ( 'target' ) ; $ target -> appendChild ( $ dom -> createCDATASection ( $ value ) ) ; $ translationNode -> appendChild ( $ target ) ; return $ translationNode ; }
Create a new trans-unit node.

@param \DOMDocument $dom
@param int $id
@param string $key
@param string $value
@return \DOMElement
Create a new trans - unit node .