src/CRUDlex/Service.php
public static function getLocales()
    {
        $localeDir     = __DIR__.'/../locales';
        $languageFiles = scandir($localeDir);
        $locales       = [];
        foreach ($languageFiles as $languageFile) {
            if (in_array($languageFile, ['.', '..'])) {
                continue;
            }
            $extensionPos = strpos($languageFile, '.yml');
            if ($extensionPos !== false) {
                $locale    = substr($languageFile, 0, $extensionPos);
                $locales[] = $locale;
            }
        }
        sort($locales);
        return $locales;
    }
public static function getLocales()
    {
        $localeDir     = __DIR__.'/../locales';
        $languageFiles = scandir($localeDir);
        $locales       = [];
        foreach ($languageFiles as $languageFile) {
            if (in_array($languageFile, ['.', '..'])) {
                continue;
            }
            $extensionPos = strpos($languageFile, '.yml');
            if ($extensionPos !== false) {
                $locale    = substr($languageFile, 0, $extensionPos);
                $locales[] = $locale;
            }
        }
        sort($locales);
        return $locales;
    }
public static function getLocales ( ) { $ localeDir = __DIR__ . '/../locales' ; $ languageFiles = scandir ( $ localeDir ) ; $ locales = [ ] ; foreach ( $ languageFiles as $ languageFile ) { if ( in_array ( $ languageFile , [ '.' , '..' ] ) ) { continue ; } $ extensionPos = strpos ( $ languageFile , '.yml' ) ; if ( $ extensionPos !== false ) { $ locale = substr ( $ languageFile , 0 , $ extensionPos ) ; $ locales [ ] = $ locale ; } } sort ( $ locales ) ; return $ locales ; }
Gets the available locales.

@return array
the available locales
Gets the available locales .