PoItem::setFromArray

public PoItem::setFromArray(array $values = array()) Create the PoItem from a structured array. Parameters array $values: File core/lib/Drupal/Component/Gettext/PoItem.php, line 174 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code public function setFromArray(array $values = array()) { if (isset($values['context'])) { $this->setContext($values['context']); } if (isset($values['source'])) { $this->setSource($values['source']); }

PoItem::setContext

PoItem::setContext($context) Set the context this translation belongs to. Parameters string $context: File core/lib/Drupal/Component/Gettext/PoItem.php, line 89 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function setContext($context) { $this->_context = $context; }

PoItem::setComment

PoItem::setComment($comment) Set the comment of this translation. Parameters string $comment: File core/lib/Drupal/Component/Gettext/PoItem.php, line 165 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function setComment($comment) { $this->_comment = $comment; }

PoItem::isPlural

PoItem::isPlural() Get if the translation has plural values. Return value bool File core/lib/Drupal/Component/Gettext/PoItem.php, line 147 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function isPlural() { return $this->_plural; }

PoItem::getTranslation

PoItem::getTranslation() Gets the translation string or the array of strings if the translation has plurals. Return value string or array $translation File core/lib/Drupal/Component/Gettext/PoItem.php, line 119 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function getTranslation() { return $this->_translation; }

PoItem::getSource

PoItem::getSource() Gets the source string or the array of strings if the translation has plurals. Return value string or array $translation File core/lib/Drupal/Component/Gettext/PoItem.php, line 99 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function getSource() { return $this->_source; }

PoItem::getLangcode

PoItem::getLangcode() Gets the language code of the currently used language. Return value string with langcode File core/lib/Drupal/Component/Gettext/PoItem.php, line 62 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function getLangcode() { return $this->_langcode; }

PoItem::getContext

PoItem::getContext() Gets the context this translation belongs to. Return value string $context File core/lib/Drupal/Component/Gettext/PoItem.php, line 80 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function getContext() { return $this->_context; }

PoItem::getComment

PoItem::getComment() Gets the comment of this translation. Return value String $comment File core/lib/Drupal/Component/Gettext/PoItem.php, line 156 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code function getComment() { return $this->_comment; }

PoItem::formatString

private PoItem::formatString($string) Formats a string for output on multiple lines. File core/lib/Drupal/Component/Gettext/PoItem.php, line 262 Class PoItem PoItem handles one translation. Namespace Drupal\Component\Gettext Code private function formatString($string) { // Escape characters for processing. $string = addcslashes($string, "\0..\37\\\""); // Always include a line break after the explicit \n line breaks from // the source string. Otherwise wrap at 70 chars to acco