framework/RedKiteCms/Bridge/Translation/Loader/TranslationLoader.php
public function registerResources(Translator $translator, array $dirs)
    {
        $finder = new Finder();
        $files = $finder->files()->depth(0)->ignoreUnreadableDirs()->in($dirs);
        foreach ($files as $file) {
            $file = (string)$file;
            preg_match_all('/[^.]+/', basename($file), $match);

            $translator->addResource('xliff', $file, $match[0][1], "RedKiteCms");
        }
    }
public function registerResources(Translator $translator, array $dirs)
    {
        $finder = new Finder();
        $files = $finder->files()->depth(0)->ignoreUnreadableDirs()->in($dirs);
        foreach ($files as $file) {
            $file = (string)$file;
            preg_match_all('/[^.]+/', basename($file), $match);

            $translator->addResource('xliff', $file, $match[0][1], "RedKiteCms");
        }
    }
public function registerResources ( Translator $ translator , array $ dirs ) { $ finder = new Finder ( ) ; $ files = $ finder -> files ( ) -> depth ( 0 ) -> ignoreUnreadableDirs ( ) -> in ( $ dirs ) ; foreach ( $ files as $ file ) { $ file = ( string ) $ file ; preg_match_all ( '/[^.]+/' , basename ( $ file ) , $ match ) ; $ translator -> addResource ( 'xliff' , $ file , $ match [ 0 ] [ 1 ] , "RedKiteCms" ) ; } }
Register the translation resources read from the given folders

@param Translator $translator
@param array               $dirs
Register the translation resources read from the given folders