protected function _getFromLoader($name, $locale)
    {
        $loader = $this->_loaders[$name]($name, $locale);
        $package = $loader;

        if (!is_callable($loader)) {
            $loader = function () use ($package) {
                return $package;
            };
        }

        $loader = $this->setLoaderFallback($name, $loader);

        $this->packages->set($name, $locale, $loader);

        return parent::get($name, $locale);
    }
protected function _getFromLoader($name, $locale)
    {
        $loader = $this->_loaders[$name]($name, $locale);
        $package = $loader;

        if (!is_callable($loader)) {
            $loader = function () use ($package) {
                return $package;
            };
        }

        $loader = $this->setLoaderFallback($name, $loader);

        $this->packages->set($name, $locale, $loader);

        return parent::get($name, $locale);
    }
protected function _getFromLoader ( $ name , $ locale ) { $ loader = $ this -> _loaders [ $ name ] ( $ name , $ locale ) ; $ package = $ loader ; if ( ! is_callable ( $ loader ) ) { $ loader = function ( ) use ( $ package ) { return $ package ; } ; } $ loader = $ this -> setLoaderFallback ( $ name , $ loader ) ; $ this -> packages -> set ( $ name , $ locale , $ loader ) ; return parent :: get ( $ name , $ locale ) ; }
Registers a new package by passing the register loaded function for the
package name.

@param string $name The name of the translator package
@param string $locale The locale that should be built the package for
@return \Aura\Intl\TranslatorInterface A translator object.
Registers a new package by passing the register loaded function for the package name .