public static function getAvailableLangsByUsage( core_kernel_classes_Resource $usage)
    {
        $returnValue = array();
        
        foreach (self::getAvailableLangs() as $code => $langData) {
            if (in_array($usage->getUri(), $langData[tao_models_classes_LanguageService::PROPERTY_LANGUAGE_USAGES])) {
                $lang = new core_kernel_classes_Resource($langData['uri']);
                $returnValue[$code] = $lang->getLabel();
            }
        }
        return $returnValue;
    }
public static function getAvailableLangsByUsage( core_kernel_classes_Resource $usage)
    {
        $returnValue = array();
        
        foreach (self::getAvailableLangs() as $code => $langData) {
            if (in_array($usage->getUri(), $langData[tao_models_classes_LanguageService::PROPERTY_LANGUAGE_USAGES])) {
                $lang = new core_kernel_classes_Resource($langData['uri']);
                $returnValue[$code] = $lang->getLabel();
            }
        }
        return $returnValue;
    }
public static function getAvailableLangsByUsage ( core_kernel_classes_Resource $ usage ) { $ returnValue = array ( ) ; foreach ( self :: getAvailableLangs ( ) as $ code => $ langData ) { if ( in_array ( $ usage -> getUri ( ) , $ langData [ tao_models_classes_LanguageService :: PROPERTY_LANGUAGE_USAGES ] ) ) { $ lang = new core_kernel_classes_Resource ( $ langData [ 'uri' ] ) ; $ returnValue [ $ code ] = $ lang -> getLabel ( ) ; } } return $ returnValue ; }
Get available languages from the knownledge base depending on a specific usage.

By default, TAO considers two built-in usages:

* GUI Language ('http://www.tao.lu/Ontologies/TAO.rdf#LanguageUsageGUI')
* Data Language ('http://www.tao.lu/Ontologies/TAO.rdf#LanguageUsageData')

@author Jérôme Bogaerts <jerome@taotesting.com>
@param core_kernel_classes_Resource $usage Resource usage An instance of tao:LanguagesUsages from the knowledge base.
@return array An associative array of core_kernel_classes_Resource objects index by language code.
Get available languages from the knownledge base depending on a specific usage .