public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('Locale');

        $node->appendChild($document->createElement('Language', $this->getLanguage()));
        $node->appendChild($document->createElement('Dialect', $this->getDialect()));

        return $node;
    }
public function toNode(DOMDocument $document = null)
    {
        if (null === $document) {
            $document = new DOMDocument();
        }

        $node = $document->createElement('Locale');

        $node->appendChild($document->createElement('Language', $this->getLanguage()));
        $node->appendChild($document->createElement('Dialect', $this->getDialect()));

        return $node;
    }
@param null|DOMDocument $document

@return DOMElement