Yes, or related events

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 3 October 2013 16:53, Antoine Hedgecock <notifications@github.com> wrote:

> In src/MCNI18n/Mvc/ServiceFactory/TranslatorServiceFactory.php:
>
> > +    {
> > +        $translator = parent::createService($sl);
> > +        $translator->enableEventManager();
> > +
> > +        $locale        = $sl->get('MCNI18n\Service\LocaleService');
> > +        $translatables = $sl->get('MCNI18n\Service\TranslatableService');
> > +
> > +        // setup the translator to use our translatable service
> > +        $translator->getEventManager()->attach('missingTranslation', array($translatables, 'addMissingTranslatable'));
> > +        $translator->getPluginManager()->setService('remote.db', $translatables);
> > +
> > +        foreach ($translatables->fetchAllDomains() as $domain) {
> > +            $translator->addRemoteTranslations('remote.db', $domain);
> > +        }
> > +
> > +        AbstractValidator::setDefaultTranslator($translator);
>
> Should i move it to the onBootstrap ?
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/macnibblet/MCNI18n/pull/2/files#r6743102>
> .
>