extractXliff1 example

$catalogue->addResource(new FileResource($resource));
        }

        return $catalogue;
    }

    private function extract(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain): void
    {
        $xliffVersion = XliffUtils::getVersionNumber($dom);

        if ('1.2' === $xliffVersion) {
            $this->extractXliff1($dom$catalogue$domain);
        }

        if ('2.0' === $xliffVersion) {
            $this->extractXliff2($dom$catalogue$domain);
        }
    }

    /** * Extract messages and metadata from DOMDocument into a MessageCatalogue. */
    private function extractXliff1(\DOMDocument $dom, MessageCatalogue $catalogue, string $domain): void
    {
Home | Imprint | This part of the site doesn't use cookies.