I use a custom storage for translations in Symfony2, but I want to make sure that the translations will be loaded only from my storage, and not from other sources (such as Yaml files). How can I disable the standard loaders? In my custom Translator
class I have the following code:
/**
* {@inheritdoc}
*/
protected function loadCatalogue($locale)
{
$this->initializeCatalogue($locale);
}
/**
* {@inheritdoc}
*/
protected function initializeCatalogue($locale)
{
$this->addLoader('storageLoader', $this->container->get('my.translation.loader'));
$this->addResource('storageLoader', $this->container->get('storage.getter'), $locale);
parent::initializeCatalogue($locale);
}
But in parent::initializeCatalogue($locale);
it loads all standard loaders. I found this post, where how I get guy only delete cache files, to make sure that translation getting only from the database, or did I miss something?