Current Path : C:/Users/Mahmood/Desktop/moodle8/auth/cas/ |
Current File : C:/Users/Mahmood/Desktop/moodle8/auth/cas/languages.php |
<?php $caslangconstprefix = 'PHPCAS_LANG_'; $caslangprefixlen = strlen('CAS_Languages_'); $CASLANGUAGES = array (); $consts = get_defined_constants(true); foreach ($consts['user'] as $key => $value) { if (preg_match("/^$caslangconstprefix/", $key)) { $CASLANGUAGES[$value] = substr($value, $caslangprefixlen); } } if (empty($CASLANGUAGES)) { $CASLANGUAGES = array (PHPCAS_LANG_ENGLISH => 'English', PHPCAS_LANG_FRENCH => 'French'); }