private function _getPoParsers($source, $targetLanguage)
{
$files = array();
if ($source == Kwf_Trl::SOURCE_WEB) {
if (file_exists('trl/' . $targetLanguage . '.po')) {
$files = array('trl/' . $targetLanguage . '.po');
}
} else {
if ($source == Kwf_Trl::SOURCE_KWF) {
// check all composer packages
$this->_checkPackagesForTrlFilesAndTryDownloadFromKoalaWebsiteIfNotExisting($targetLanguage);
$files = glob(VENDOR_PATH . '/*/*/trl/' . $targetLanguage . '.po');
}
}
require_once VENDOR_PATH . '/autoload.php';
$poParsers = array();
foreach ($files as $file) {
$poParser = \Sepia\PoParser::parseFile($file);
array_push($poParsers, $poParser);
}
return $poParsers;
}