/**
  * @param MessageCollection $collection
  * @return string
  */
 protected function writeReal(MessageCollection $collection)
 {
     $output = '';
     $authors = $collection->getAuthors();
     $authors = $this->filterAuthors($authors, $collection->code);
     $output .= implode(self::RECORD_SEPARATOR, $authors);
     $output .= self::PART_SEPARATOR;
     $mangler = $this->group->getMangler();
     /** @var TMessage $m */
     foreach ($collection as $key => $m) {
         $key = $mangler->unmangle($key);
         $trans = $m->translation();
         $output .= "{$key}={$trans}" . self::RECORD_SEPARATOR;
     }
     return $output;
 }
Esempio n. 2
0
	/**
	 * @param $collection MessageCollection
	 * @return string
	 */
	protected function writeReal( MessageCollection $collection ) {
		$output = '';

		$authors = $collection->getAuthors();
		$authors = $this->filterAuthors( $authors, $collection->code );
		$output .= implode( "\0", $authors );
		$output .= "\0\0\0\0";

		$mangler = $this->group->getMangler();

		foreach ( $collection as $key => $m ) {
			$key = $mangler->unmangle( $key );
			$trans = $m->translation();
			$output .= "$key=$trans\0";
		}

		return $output;
	}