App\Services\Locale\TranslationLoader::load PHP Method

load() public method

Load the messages for the given locale.
public load ( string $locale, string $group, string $namespace = null ) : array
$locale string
$group string
$namespace string
return array
    public function load($locale, $group, $namespace = null) : array
    {
        if (!is_null($namespace) && $namespace !== '*') {
            return $this->loadNamespaced($locale, $group, $namespace);
        }
        if (!$this->fragmentsAreAvailable()) {
            return [];
        }
        return Cache::rememberForever("locale.fragments.{$locale}.{$group}", function () use($group, $locale) {
            return Fragment::getGroup($group, $locale);
        });
    }