Merge branch 'wip-MDL-49439-master' of https://github.com/marinaglancy/moodle
[moodle.git] / auth / cas / languages.php
blobd1de0a72cd4395005d031e0fcd4a02effd008e4b
1 <?php
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');