protected $relativePathTemplate = '%domain%/%locale%.%extension%';
public function formatCatalogue(MessageCatalogue
$messages, string
$domain, array
$options =
[]): string
{ $data =
$indexes =
$resources = '';
foreach ($messages->
all($domain) as $source =>
$target) { $indexes .=
pack('v', \
strlen($data) + 28
);
$data .=
$source."\0";
} $data .=
$this->
writePadding($data);
$keyTop =
$this->
getPosition($data);
foreach ($messages->
all($domain) as $source =>
$target) { $resources .=
pack('V',
$this->
getPosition($data));
$data .=
pack('V', \
strlen($target)) .
mb_convert_encoding($target."\0", 'UTF-16LE', 'UTF-8'
) .
$this->
writePadding($data) ;
}