public PoMemoryWriter::writeItem(PoItem $item)
Writes the given item.
PoItem $item: One specific item to write.
Overrides PoWriterInterface::writeItem
public function writeItem(PoItem $item) { if (is_array($item->getSource())) { $item->setSource(implode(LOCALE_PLURAL_DELIMITER, $item->getSource())); $item->setTranslation(implode(LOCALE_PLURAL_DELIMITER, $item->getTranslation())); } $context = $item->getContext(); $this->_items[$context != NULL ? $context : ''][$item->getSource()] = $item->getTranslation(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Gettext!PoMemoryWriter.php/function/PoMemoryWriter::writeItem/8.1.x