Dimsav\Translatable\Translatable::getLocales PHP Метод

getLocales() защищенный Метод

protected getLocales ( ) : array
Результат array
    protected function getLocales()
    {
        $localesConfig = (array) app()->make('config')->get('translatable.locales');
        if (empty($localesConfig)) {
            throw new LocalesNotDefinedException('Please make sure you have run "php artisan config:publish dimsav/laravel-translatable" ' . ' and that the locales configuration is defined.');
        }
        $locales = [];
        foreach ($localesConfig as $key => $locale) {
            if (is_array($locale)) {
                $locales[] = $key;
                foreach ($locale as $countryLocale) {
                    $locales[] = $key . $this->getLocaleSeparator() . $countryLocale;
                }
            } else {
                $locales[] = $locale;
            }
        }
        return $locales;
    }