public function getLanguageModels() {
        $models = array();
        $ns = $this->localNs;
        
        $extensionPath = dirname(__FILE__) . '/../../../tao';
        $localesPath = $extensionPath . '/locales';
        
        if (@is_dir($localesPath) && @is_readable($localesPath)) {
            $localeDirectories = scandir($localesPath);
            
            foreach ($localeDirectories as $localeDir) {
                $path = $localesPath . '/' . $localeDir;
                if ($localeDir[0] != '.' && @is_dir($path)){
                    // Look if the lang.rdf can be read.
                    $languageModelFile = $path . '/lang.rdf';
                    if (@file_exists($languageModelFile) && @is_readable($languageModelFile)){
                        // Add this file to the returned values.
                        if (!isset($models[$ns])){
                            $models[$ns] = array();
                        }
                        
                        $models[$ns][] = $languageModelFile;
                    }
                }
            }
        
            return $models;
        }
        else{
            throw new tao_install_utils_Exception("Cannot read 'locales' directory in extenstion 'tao'.");
        }
    }
public function getLanguageModels() {
        $models = array();
        $ns = $this->localNs;
        
        $extensionPath = dirname(__FILE__) . '/../../../tao';
        $localesPath = $extensionPath . '/locales';
        
        if (@is_dir($localesPath) && @is_readable($localesPath)) {
            $localeDirectories = scandir($localesPath);
            
            foreach ($localeDirectories as $localeDir) {
                $path = $localesPath . '/' . $localeDir;
                if ($localeDir[0] != '.' && @is_dir($path)){
                    // Look if the lang.rdf can be read.
                    $languageModelFile = $path . '/lang.rdf';
                    if (@file_exists($languageModelFile) && @is_readable($languageModelFile)){
                        // Add this file to the returned values.
                        if (!isset($models[$ns])){
                            $models[$ns] = array();
                        }
                        
                        $models[$ns][] = $languageModelFile;
                    }
                }
            }
        
            return $models;
        }
        else{
            throw new tao_install_utils_Exception("Cannot read 'locales' directory in extenstion 'tao'.");
        }
    }
public function getLanguageModels ( ) { $ models = array ( ) ; $ ns = $ this -> localNs ; $ extensionPath = dirname ( __FILE__ ) . '/../../../tao' ; $ localesPath = $ extensionPath . '/locales' ; if ( @ is_dir ( $ localesPath ) && @ is_readable ( $ localesPath ) ) { $ localeDirectories = scandir ( $ localesPath ) ; foreach ( $ localeDirectories as $ localeDir ) { $ path = $ localesPath . '/' . $ localeDir ; if ( $ localeDir [ 0 ] != '.' && @ is_dir ( $ path ) ) { // Look if the lang.rdf can be read. $ languageModelFile = $ path . '/lang.rdf' ; if ( @ file_exists ( $ languageModelFile ) && @ is_readable ( $ languageModelFile ) ) { // Add this file to the returned values. if ( ! isset ( $ models [ $ ns ] ) ) { $ models [ $ ns ] = array ( ) ; } $ models [ $ ns ] [ ] = $ languageModelFile ; } } } return $ models ; } else { throw new tao_install_utils_Exception ( "Cannot read 'locales' directory in extenstion 'tao'." ) ; } }
Convenience method that returns available language descriptions to be inserted in the
knowledge base.

@return array of ns => files
Convenience method that returns available language descriptions to be inserted in the knowledge base .