public function output() { if (MessageGroups::isDynamic($this->group)) { return 'Not supported'; } $ffs = null; if ($this->group instanceof FileBasedMessageGroup) { $ffs = $this->group->getFFS(); } if (!$ffs instanceof GettextFFS) { $group = FileBasedMessageGroup::newFromMessageGroup($this->group); $ffs = new GettextFFS($group); } $ffs->setOfflineMode('true'); $code = $this->options['language']; $id = $this->group->getID(); $filename = "{$id}_{$code}.po"; header("Content-Disposition: attachment; filename=\"{$filename}\""); return $ffs->writeIntoVariable($this->collection); }