function PoDatabaseWriter::writeItem

Implements Drupal\Component\Gettext\PoWriterInterface::writeItem().

Overrides PoWriterInterface::writeItem

1 call to PoDatabaseWriter::writeItem()

File

drupal/core/modules/locale/lib/Drupal/locale/PoDatabaseWriter.php, line 190
Definition of Drupal\locale\PoDatabaseWriter.

Class

PoDatabaseWriter
Gettext PO writer working with the locale module database.

Namespace

Drupal\locale

Code

function writeItem(PoItem $item) {
  if ($item
    ->isPlural()) {
    $item
      ->setSource(join(LOCALE_PLURAL_DELIMITER, $item
      ->getSource()));
    $item
      ->setTranslation(join(LOCALE_PLURAL_DELIMITER, $item
      ->getTranslation()));
  }
  $this
    ->importString($item);
}