2010-07-25 22:36:15 +00:00
|
|
|
<?php
|
|
|
|
|
2012-10-22 00:42:44 +02:00
|
|
|
$caslangconstprefix = 'PHPCAS_LANG_';
|
2013-09-17 17:03:26 +02:00
|
|
|
$caslangprefixlen = strlen('CAS_Languages_');
|
2010-07-25 22:36:15 +00:00
|
|
|
$CASLANGUAGES = array ();
|
|
|
|
|
|
|
|
$consts = get_defined_constants(true);
|
|
|
|
foreach ($consts['user'] as $key => $value) {
|
2012-10-22 00:42:44 +02:00
|
|
|
if (preg_match("/^$caslangconstprefix/", $key)) {
|
|
|
|
$CASLANGUAGES[$value] = substr($value, $caslangprefixlen);
|
2010-07-25 22:36:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (empty($CASLANGUAGES)) {
|
2012-10-22 00:42:44 +02:00
|
|
|
$CASLANGUAGES = array (PHPCAS_LANG_ENGLISH => 'English',
|
|
|
|
PHPCAS_LANG_FRENCH => 'French');
|
2010-07-25 22:36:15 +00:00
|
|
|
}
|