concrete/src/Localization/Localization.php
public static function getAvailableInterfaceLanguages()
    {
        $languages = [];
        $fh = Core::make('helper/file');

        if (file_exists(DIR_LANGUAGES)) {
            $contents = $fh->getDirectoryContents(DIR_LANGUAGES);
            foreach ($contents as $con) {
                if (is_dir(DIR_LANGUAGES . '/' . $con) && file_exists(DIR_LANGUAGES . '/' . $con . '/LC_MESSAGES/messages.mo')) {
                    $languages[] = $con;
                }
            }
        }
        if (file_exists(DIR_LANGUAGES_CORE)) {
            $contents = $fh->getDirectoryContents(DIR_LANGUAGES_CORE);
            foreach ($contents as $con) {
                if (is_dir(DIR_LANGUAGES_CORE . '/' . $con) && file_exists(DIR_LANGUAGES_CORE . '/' . $con . '/LC_MESSAGES/messages.mo') && (!in_array($con, $languages))) {
                    $languages[] = $con;
                }
            }
        }

        return $languages;
    }
public static function getAvailableInterfaceLanguages()
    {
        $languages = [];
        $fh = Core::make('helper/file');

        if (file_exists(DIR_LANGUAGES)) {
            $contents = $fh->getDirectoryContents(DIR_LANGUAGES);
            foreach ($contents as $con) {
                if (is_dir(DIR_LANGUAGES . '/' . $con) && file_exists(DIR_LANGUAGES . '/' . $con . '/LC_MESSAGES/messages.mo')) {
                    $languages[] = $con;
                }
            }
        }
        if (file_exists(DIR_LANGUAGES_CORE)) {
            $contents = $fh->getDirectoryContents(DIR_LANGUAGES_CORE);
            foreach ($contents as $con) {
                if (is_dir(DIR_LANGUAGES_CORE . '/' . $con) && file_exists(DIR_LANGUAGES_CORE . '/' . $con . '/LC_MESSAGES/messages.mo') && (!in_array($con, $languages))) {
                    $languages[] = $con;
                }
            }
        }

        return $languages;
    }
public static function getAvailableInterfaceLanguages ( ) { $ languages = [ ] ; $ fh = Core :: make ( 'helper/file' ) ; if ( file_exists ( DIR_LANGUAGES ) ) { $ contents = $ fh -> getDirectoryContents ( DIR_LANGUAGES ) ; foreach ( $ contents as $ con ) { if ( is_dir ( DIR_LANGUAGES . '/' . $ con ) && file_exists ( DIR_LANGUAGES . '/' . $ con . '/LC_MESSAGES/messages.mo' ) ) { $ languages [ ] = $ con ; } } } if ( file_exists ( DIR_LANGUAGES_CORE ) ) { $ contents = $ fh -> getDirectoryContents ( DIR_LANGUAGES_CORE ) ; foreach ( $ contents as $ con ) { if ( is_dir ( DIR_LANGUAGES_CORE . '/' . $ con ) && file_exists ( DIR_LANGUAGES_CORE . '/' . $ con . '/LC_MESSAGES/messages.mo' ) && ( ! in_array ( $ con , $ languages ) ) ) { $ languages [ ] = $ con ; } } } return $ languages ; }
Gets a list of the available site interface languages. Returns an array
that where each item is a locale in format xx_XX.

@return array
Gets a list of the available site interface languages . Returns an array that where each item is a locale in format xx_XX .