PoDatabaseWriter::writeItem

public PoDatabaseWriter::writeItem(PoItem $item)

Writes the given item.

Parameters

PoItem $item: One specific item to write.

Overrides PoWriterInterface::writeItem

File

core/modules/locale/src/PoDatabaseWriter.php, line 179

Class

PoDatabaseWriter
Gettext PO writer working with the locale module database.

Namespace

Drupal\locale

Code

public function writeItem(PoItem $item) {
  if ($item->isPlural()) {
    $item->setSource(implode(LOCALE_PLURAL_DELIMITER, $item->getSource()));
    $item->setTranslation(implode(LOCALE_PLURAL_DELIMITER, $item->getTranslation()));
  }
  $this->importString($item);
}
doc_Drupal
2016-10-29 09:34:28
Comments
Leave a Comment

Please login to continue.