src/FileLoader.php
public function load(string $locale):array
    {
        $filename = "{$this->path}/{$locale}.php";
        try {
            $loaded = $this->files->getRequire($filename);
            if (!is_array($loaded)) {
                throw new InvalidResourceException();
            }

            return $loaded;
        } catch (FileNotFoundException $e) {
            throw new NotFoundResourceException("$filename not found.", 0, $e);
        } catch (\Throwable $e) {
            throw new InvalidResourceException("$filename has invalid resources.", 0, $e);
        }
    }
public function load(string $locale):array
    {
        $filename = "{$this->path}/{$locale}.php";
        try {
            $loaded = $this->files->getRequire($filename);
            if (!is_array($loaded)) {
                throw new InvalidResourceException();
            }

            return $loaded;
        } catch (FileNotFoundException $e) {
            throw new NotFoundResourceException("$filename not found.", 0, $e);
        } catch (\Throwable $e) {
            throw new InvalidResourceException("$filename has invalid resources.", 0, $e);
        }
    }
public function load ( string $ locale ) : array { $ filename = "{$this->path}/{$locale}.php" ; try { $ loaded = $ this -> files -> getRequire ( $ filename ) ; if ( ! is_array ( $ loaded ) ) { throw new InvalidResourceException ( ) ; } return $ loaded ; } catch ( FileNotFoundException $ e ) { throw new NotFoundResourceException ( "$filename not found." , 0 , $ e ) ; } catch ( \ Throwable $ e ) { throw new InvalidResourceException ( "$filename has invalid resources." , 0 , $ e ) ; } }
Loads a locale.

@param string $locale A locale

@throws NotFoundResourceException when the resource cannot be found
@throws InvalidResourceException  when the resource cannot be loaded

@return array
Loads a locale .