public static function getDefinedLanguages($dirs = null)
    {
        $dirs = $dirs ?: self::$config['dir'];
        $languages = array();
        foreach (array_filter(Atomik::path((array) $dirs)) as $dir) {
            if (is_dir($dir)) {
                foreach (new DirectoryIterator($dir) as $file) {
                    $filename = $file->getFilename();
                    if ($filename{0} == '.' || $file->isDir()) {
                        continue;
                    }
                    $languages[] = substr($filename, 0, strrpos($filename, '.'));
                }
            }
        }
        return $languages;
    }
public static function getDefinedLanguages($dirs = null)
    {
        $dirs = $dirs ?: self::$config['dir'];
        $languages = array();
        foreach (array_filter(Atomik::path((array) $dirs)) as $dir) {
            if (is_dir($dir)) {
                foreach (new DirectoryIterator($dir) as $file) {
                    $filename = $file->getFilename();
                    if ($filename{0} == '.' || $file->isDir()) {
                        continue;
                    }
                    $languages[] = substr($filename, 0, strrpos($filename, '.'));
                }
            }
        }
        return $languages;
    }
public static function getDefinedLanguages ( $ dirs = null ) { $ dirs = $ dirs ? : self :: $ config [ 'dir' ] ; $ languages = array ( ) ; foreach ( array_filter ( Atomik :: path ( ( array ) $ dirs ) ) as $ dir ) { if ( is_dir ( $ dir ) ) { foreach ( new DirectoryIterator ( $ dir ) as $ file ) { $ filename = $ file -> getFilename ( ) ; if ( $ filename { 0 } == '.' || $ file -> isDir ( ) ) { continue ; } $ languages [ ] = substr ( $ filename , 0 , strrpos ( $ filename , '.' ) ) ; } } } return $ languages ; }
Gets defined languages

@param string|array $dirs OPTIONAL Directories where language files are stored
@return array
Gets defined languages