Store the parsed values as a PoItem object.
public function setItemFromArray($value) {
$plural = FALSE;
$comments = '';
if (isset($value['#'])) {
$comments = $this
->shortenComments($value['#']);
}
if (is_array($value['msgstr'])) {
// Sort plural variants by their form index.
ksort($value['msgstr']);
$plural = TRUE;
}
$item = new PoItem();
$item
->setContext(isset($value['msgctxt']) ? $value['msgctxt'] : '');
$item
->setSource($value['msgid']);
$item
->setTranslation($value['msgstr']);
$item
->setPlural($plural);
$item
->setComment($comments);
$item
->setLangcode($this->_langcode);
$this->_last_item = $item;
$this->_context = 'COMMENT';
}