private function getLocalXliffFile(TranslationResource $resource, $languageCode)
    {
        $domain    = substr($resource->getSlug(), strlen($this->prefix));
        $localFile = $this->txlang . DIRECTORY_SEPARATOR .
            substr($languageCode, 0, 2) . DIRECTORY_SEPARATOR .
            $domain . '.xlf';

        $local = new XliffFile($localFile);
        if (!file_exists($localFile)) {
            // Set base values.
            $local->setDataType('php');
            $local->setOriginal($domain);
            $local->setSrcLang($this->baselanguage);
            $local->setTgtLang(substr($languageCode, 0, 2));
        }

        return $local;
    }