3 $caslangconstprefix = 'PHPCAS_LANG_';
4 $caslangprefixlen = strlen('CAS_Languages_');
5 $CASLANGUAGES = array ();
7 $consts = get_defined_constants(true);
8 foreach ($consts['user'] as $key => $value) {
9 if (preg_match("/^$caslangconstprefix/", $key)) {
10 $CASLANGUAGES[$value] = substr($value, $caslangprefixlen);
13 if (empty($CASLANGUAGES)) {
14 $CASLANGUAGES = array (PHPCAS_LANG_ENGLISH
=> 'English',
15 PHPCAS_LANG_FRENCH
=> 'French');