mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
9953966213
Also correct language class name.
17 lines
483 B
PHP
17 lines
483 B
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');
|
|
}
|