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;
    }
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;
    }
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 ; }
Create a xliff instance for the passed resource.

@param TranslationResource $resource     The resource.

@param string              $languageCode The language code.

@return XliffFile
Create a xliff instance for the passed resource .