public function loadResource($format, $resource, $domain, MessageCatalogue $catalogue)
{
if (!isset($this->loaders[$format])) {
if (!isset($this->serviceIds[$format])) {
throw new LoaderNotFoundException(sprintf('The "%s" translation loader is not registered.', $resource[0]));
}
$this->loaders[$format] = $this->serviceLocator->getService($this->serviceIds[$format]);
unset($this->serviceIds[$format]);
}
$catalogue->addCatalogue($this->loaders[$format]->load($resource, $catalogue->getLocale(), $domain));
}