{}.
14 $lines =
array(
'msgid ""',
'msgstr ""');
16 $headers = $translations->getHeaders();
17 $headers[
'PO-Revision-Date'] =
date(
'c');
19 foreach ($headers as
$name => $value) {
20 $lines[] =
'"'.$name.
': '.$value.
'\\n"';
26 foreach ($translations as $translation) {
27 if ($translation->hasComments()) {
28 foreach ($translation->getComments() as
$comment) {
29 $lines[] =
'# '.$comment;
33 if ($translation->hasExtractedComments()) {
34 foreach ($translation->getExtractedComments() as
$comment) {
35 $lines[] =
'#. '.$comment;
39 if ($translation->hasReferences()) {
40 foreach ($translation->getReferences() as $reference) {
41 $lines[] =
'#: '.$reference[0].(!is_null($reference[1]) ?
':'.$reference[1] : null);
45 if ($translation->hasFlags()) {
46 $lines[] =
'#, '.implode(
',', $translation->getFlags());
49 if ($translation->hasContext()) {
50 $lines[] =
'msgctxt '.self::convertString($translation->getContext());
53 self::addLines($lines,
'msgid', $translation->getOriginal());
54 if ($translation->hasPlural()) {
55 self::addLines($lines,
'msgid_plural', $translation->getPlural());
56 self::addLines($lines,
'msgstr[0]', $translation->getTranslation());
58 foreach ($translation->getPluralTranslation() as $k => $v) {
59 self::addLines($lines,
'msgstr['.($k + 1).
']', $v);
62 self::addLines($lines,
'msgstr', $translation->getTranslation());
68 return implode(
"\n", $lines);
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
Create styles array
The data for the language used.