function PoItem::formatSingular

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Component/Gettext/PoItem.php \Drupal\Component\Gettext\PoItem::formatSingular()

Formats a singular translation.

File

core/lib/Drupal/Component/Gettext/PoItem.php, line 266

Class

PoItem
PoItem handles one translation.

Namespace

Drupal\Component\Gettext

Code

private function formatSingular() {
  $output = '';
  $output .= 'msgid ' . $this->formatString($this->source);
  $output .= 'msgstr ' . (isset($this->translation) ? $this->formatString($this->translation) : '""');
  return $output;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.