src/Services/Translations/Reader.php
public function read(Collection $files, Collection $locales)
    {
        return $locales->reduce(function ($translations, $locale) use ($files) {
            $files->each(function ($file) use ($locale, &$translations) {
                if (file_exists($path = $this->pathToFile($file, $locale))) {
                    $content[$file] = include_once $path;

                    foreach (array_dot($content) as $key => $value) {
                        $translations[$key][$locale->iso6391()] = $value ? $value : '';
                    }
                }
            });

            return $translations;
        }, []);
    }
public function read(Collection $files, Collection $locales)
    {
        return $locales->reduce(function ($translations, $locale) use ($files) {
            $files->each(function ($file) use ($locale, &$translations) {
                if (file_exists($path = $this->pathToFile($file, $locale))) {
                    $content[$file] = include_once $path;

                    foreach (array_dot($content) as $key => $value) {
                        $translations[$key][$locale->iso6391()] = $value ? $value : '';
                    }
                }
            });

            return $translations;
        }, []);
    }
public function read ( Collection $ files , Collection $ locales ) { return $ locales -> reduce ( function ( $ translations , $ locale ) use ( $ files ) { $ files -> each ( function ( $ file ) use ( $ locale , & $ translations ) { if ( file_exists ( $ path = $ this -> pathToFile ( $ file , $ locale ) ) ) { $ content [ $ file ] = include_once $ path ; foreach ( array_dot ( $ content ) as $ key => $ value ) { $ translations [ $ key ] [ $ locale -> iso6391 ( ) ] = $ value ? $ value : '' ; } } } ) ; return $ translations ; } , [ ] ) ; }
Reads the translation file's contents.

@param Collection $files
@param Collection $locales

@return mixed
Reads the translation file s contents .