src/Serializer.php
public function serialize(TranslatableInterface $translatable, $targetLang) {
    $output = $this->beginExport($translatable, $targetLang);
    $output .= $this->exportTranslatable($translatable, $targetLang);
    $output .= $this->endExport();
    return $output;
  }
public function serialize(TranslatableInterface $translatable, $targetLang) {
    $output = $this->beginExport($translatable, $targetLang);
    $output .= $this->exportTranslatable($translatable, $targetLang);
    $output .= $this->endExport();
    return $output;
  }
public function serialize ( TranslatableInterface $ translatable , $ targetLang ) { $ output = $ this -> beginExport ( $ translatable , $ targetLang ) ; $ output .= $ this -> exportTranslatable ( $ translatable , $ targetLang ) ; $ output .= $ this -> endExport ( ) ; return $ output ; }
Serializes a given translatable into an XLIFF file with the specified
target language.

@param TranslatableInterface $translatable
The translatable to be serialized.

@param string $targetLang
The desired target language.

@return string
The resultant XLIFF file as a string.
Serializes a given translatable into an XLIFF file with the specified target language .