src/Viserio/Component/Translation/Provider/TranslationServiceProvider.php
public static function createTranslationManager(ContainerInterface $container): TranslationManagerContract
    {
        $options = self::resolveOptions($container->get('config'));

        $manager = new TranslationManager($container->get(MessageFormatterContract::class));

        if ($container->has(LoaderContract::class)) {
            $manager->setLoader($container->get(LoaderContract::class));
        }

        if (isset($options['locale'])) {
            $manager->setLocale($options['locale']);
        }

        if (isset($options['directories'])) {
            $manager->setDirectories($options['directories']);
        }

        if (isset($options['files'])) {
            foreach ((array) $options['files'] as $import) {
                $manager->import($import);
            }
        }

        if ($container->has(PsrLoggerInterface::class)) {
            $manager->setLogger($container->get(PsrLoggerInterface::class));
        }

        return $manager;
    }
public static function createTranslationManager(ContainerInterface $container): TranslationManagerContract
    {
        $options = self::resolveOptions($container->get('config'));

        $manager = new TranslationManager($container->get(MessageFormatterContract::class));

        if ($container->has(LoaderContract::class)) {
            $manager->setLoader($container->get(LoaderContract::class));
        }

        if (isset($options['locale'])) {
            $manager->setLocale($options['locale']);
        }

        if (isset($options['directories'])) {
            $manager->setDirectories($options['directories']);
        }

        if (isset($options['files'])) {
            foreach ((array) $options['files'] as $import) {
                $manager->import($import);
            }
        }

        if ($container->has(PsrLoggerInterface::class)) {
            $manager->setLogger($container->get(PsrLoggerInterface::class));
        }

        return $manager;
    }
Create a new TranslationManager instance.

@param \Psr\Container\ContainerInterface $container

@return \Viserio\Component\Contract\Translation\TranslationManager