src/Support/Localization/LocaleRepository.php
public function getAvailable()
    {
        // If explicitly set in CMS config, this overrules all else
        $configLocales = $this->core->config('locale.available');

        if (is_array($configLocales)) {
            return $configLocales;
        }

        // Check if the localization package is used, and get locales from it
        $localizationLocales = $this->getLocalesForMcamaraLocalization();

        if ($localizationLocales) {
            return $localizationLocales;
        }

        // Alternatively, check if translatable package locales are available
        $localizationLocales = $this->getLocalesForTranslatable();

        if ($localizationLocales) {
            return $localizationLocales;
        }

        // Fallback is to check whether the default locale is equal to the fallback locale
        // If it isn't, we still have two locales to provide, otherwise localization is disabled.
        return array_unique([
            config('app.locale'),
            config('app.fallback_locale')
        ]);
    }
public function getAvailable()
    {
        // If explicitly set in CMS config, this overrules all else
        $configLocales = $this->core->config('locale.available');

        if (is_array($configLocales)) {
            return $configLocales;
        }

        // Check if the localization package is used, and get locales from it
        $localizationLocales = $this->getLocalesForMcamaraLocalization();

        if ($localizationLocales) {
            return $localizationLocales;
        }

        // Alternatively, check if translatable package locales are available
        $localizationLocales = $this->getLocalesForTranslatable();

        if ($localizationLocales) {
            return $localizationLocales;
        }

        // Fallback is to check whether the default locale is equal to the fallback locale
        // If it isn't, we still have two locales to provide, otherwise localization is disabled.
        return array_unique([
            config('app.locale'),
            config('app.fallback_locale')
        ]);
    }
public function getAvailable ( ) { // If explicitly set in CMS config, this overrules all else $ configLocales = $ this -> core -> config ( 'locale.available' ) ; if ( is_array ( $ configLocales ) ) { return $ configLocales ; } // Check if the localization package is used, and get locales from it $ localizationLocales = $ this -> getLocalesForMcamaraLocalization ( ) ; if ( $ localizationLocales ) { return $ localizationLocales ; } // Alternatively, check if translatable package locales are available $ localizationLocales = $ this -> getLocalesForTranslatable ( ) ; if ( $ localizationLocales ) { return $ localizationLocales ; } // Fallback is to check whether the default locale is equal to the fallback locale // If it isn't, we still have two locales to provide, otherwise localization is disabled. return array_unique ( [ config ( 'app.locale' ) , config ( 'app.fallback_locale' ) ] ) ; }
Determines and returns the available locales for the application.

@return string[]
Determines and returns the available locales for the application .