Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PoDatabaseWriter.php

function PoDatabaseWriter::writeItem

Overrides PoWriterInterface::writeItem

1 call to PoDatabaseWriter::writeItem()
PoDatabaseWriter::writeItems in core/modules/locale/src/PoDatabaseWriter.php
Writes all or the given amount of items.

File

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

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(PoItem::DELIMITER, $item->getSource()));
        $item->setTranslation(implode(PoItem::DELIMITER, $item->getTranslation()));
    }
    $this->importString($item);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal