PoItem::formatSingular

private PoItem::formatSingular() Formats a singular translation. File core/lib/Drupal/Component/Gettext/PoItem.php, line 252 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; }

PoItem::formatPlural

private PoItem::formatPlural() Formats a plural translation. File core/lib/Drupal/Component/Gettext/PoItem.php, line 230 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private function formatPlural() { $output = ''; // Format source strings. $output .= 'msgid ' . $this->formatString($this->_source[0]); $output .= 'msgid_plural ' . $this->formatString($this->_source[1]); foreach ($this->_translation as $i => $trans) {

PoItem::formatItem

private PoItem::formatItem() Format the POItem as a string. File core/lib/Drupal/Component/Gettext/PoItem.php, line 205 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private function formatItem() { $output = ''; // Format string context. if (!empty($this->_context)) { $output .= 'msgctxt ' . $this->formatString($this->_context); } // Format translation. if ($this->_plural) { $output .= $this->formatPlural();

PoItem::$_translation

The translation string or array of strings if it has plurals. Type: string or array See also $_plural File core/lib/Drupal/Component/Gettext/PoItem.php, line 55 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_translation;

PoItem::$_source

The source string or array of strings if it has plurals. Type: string or array See also $_plural File core/lib/Drupal/Component/Gettext/PoItem.php, line 33 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_source;

PoItem::$_plural

Flag indicating if this translation has plurals. Type: bool File core/lib/Drupal/Component/Gettext/PoItem.php, line 40 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_plural;

PoItem::$_langcode

The language code this translation is in. @car string File core/lib/Drupal/Component/Gettext/PoItem.php, line 18 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_langcode;

PoItem::$_context

The context this translation belongs to. Type: string File core/lib/Drupal/Component/Gettext/PoItem.php, line 25 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_context = '';

PoItem::$_comment

The comment of this translation. Type: string File core/lib/Drupal/Component/Gettext/PoItem.php, line 47 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private $_comment;

PoItem

PoItem handles one translation. @todo: This class contains some really old legacy code. Hierarchy class \Drupal\Component\Gettext\PoItem See also https://www.drupal.org/node/1637662 File core/lib/Drupal/Component/Gettext/PoItem.php, line 11 Namespace Drupal\Component\Gettext Members Name Modifiers Type Description PoItem::$_comment private property The comment of this translation. PoItem::$_context private property The context this translation belongs to. PoIt