Command/ImportTranslationsCommand.php
protected function importBundleTranslationFiles(BundleInterface $bundle, $locales, $domains, $global = false)
    {
        $path = $bundle->getPath();
        if ($global) {
            $path = $this->getApplication()->getKernel()->getRootDir() . '/Resources/' . $bundle->getName() . '/translations';
            $this->output->writeln('<info>*** Importing ' . $bundle->getName() . '`s translation files from ' . $path . ' ***</info>');
        }

        $this->output->writeln(sprintf('<info># %s:</info>', $bundle->getName()));
        $finder = $this->findTranslationsFiles($path, $locales, $domains);
        $this->importTranslationFiles($finder);
    }
protected function importBundleTranslationFiles(BundleInterface $bundle, $locales, $domains, $global = false)
    {
        $path = $bundle->getPath();
        if ($global) {
            $path = $this->getApplication()->getKernel()->getRootDir() . '/Resources/' . $bundle->getName() . '/translations';
            $this->output->writeln('<info>*** Importing ' . $bundle->getName() . '`s translation files from ' . $path . ' ***</info>');
        }

        $this->output->writeln(sprintf('<info># %s:</info>', $bundle->getName()));
        $finder = $this->findTranslationsFiles($path, $locales, $domains);
        $this->importTranslationFiles($finder);
    }
protected function importBundleTranslationFiles ( BundleInterface $ bundle , $ locales , $ domains , $ global = false ) { $ path = $ bundle -> getPath ( ) ; if ( $ global ) { $ path = $ this -> getApplication ( ) -> getKernel ( ) -> getRootDir ( ) . '/Resources/' . $ bundle -> getName ( ) . '/translations' ; $ this -> output -> writeln ( '<info>*** Importing ' . $ bundle -> getName ( ) . '`s translation files from ' . $ path . ' ***</info>' ) ; } $ this -> output -> writeln ( sprintf ( '<info># %s:</info>' , $ bundle -> getName ( ) ) ) ; $ finder = $ this -> findTranslationsFiles ( $ path , $ locales , $ domains ) ; $ this -> importTranslationFiles ( $ finder ) ; }
Imports translation files form the specific bundles.

@param BundleInterface $bundle
@param array           $locales
@param array           $domains
@param boolean         $global
Imports translation files form the specific bundles .