lithium\console\command\g11n\Extract::_extract()
Extracts translatable strings from multiple files.
Returns
arrayReturns the catalog specified. Returns boolean false
when an error occurs.
Source
protected function _extract() {
$message = [];
$message[] = 'A `Catalog` class configuration with an adapter that is capable of';
$message[] = 'handling read requests for the `messageTemplate` category is needed';
$message[] = 'in order to proceed. This may also be referred to as `extractor`.';
$this->out($message);
$this->out();
$name = $this->_configuration([
'adapter' => 'Code',
'path' => $this->source,
'scope' => $this->scope
]);
$configs = Catalog::config();
try {
return Catalog::read($name, 'messageTemplate', 'root', [
'scope' => $configs[$name]['scope'],
'lossy' => false
]);
} catch (Exception $e) {
return false;
}
}