W3cubDocs

/Drupal 8

class 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.
PoItem::$_langcode private property The language code this translation is in.
PoItem::$_plural private property Flag indicating if this translation has plurals.
PoItem::$_source private property The source string or array of strings if it has plurals.
PoItem::$_translation private property The translation string or array of strings if it has plurals.
PoItem::formatItem private function Format the POItem as a string.
PoItem::formatPlural private function Formats a plural translation.
PoItem::formatSingular private function Formats a singular translation.
PoItem::formatString private function Formats a string for output on multiple lines.
PoItem::getComment function Gets the comment of this translation.
PoItem::getContext function Gets the context this translation belongs to.
PoItem::getLangcode function Gets the language code of the currently used language.
PoItem::getSource function Gets the source string or the array of strings if the translation has plurals.
PoItem::getTranslation function Gets the translation string or the array of strings if the translation has plurals.
PoItem::isPlural function Get if the translation has plural values.
PoItem::setComment function Set the comment of this translation.
PoItem::setContext function Set the context this translation belongs to.
PoItem::setFromArray public function Create the PoItem from a structured array.
PoItem::setLangcode function Set the language code of the current language.
PoItem::setPlural function Set if the translation has plural values.
PoItem::setSource function Set the source string or the array of strings if the translation has plurals.
PoItem::setTranslation function Set the translation string or the array of strings if the translation has plurals.
PoItem::__toString public function Output the PoItem as a string.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Gettext!PoItem.php/class/PoItem/8.1.x