4 require_once
'Services/Language/classes/class.ilLanguage.php';
5 require_once
'Services/Language/classes/class.ilLanguageDetectorFactory.php';
33 $ilLog = $DIC->logger()->lang();
36 $detected_language = $installed_languages[0];
38 foreach ($this->factory->getValidInstances() as $detector) {
40 $language = $detector->getIso2LanguageCode();
41 if (in_array($language, $installed_languages)) {
42 $detected_language = $language;
45 $ilLog->warning($e->getMessage());
49 return $detected_language;
Class ilLanguageDetectorFactory.
Class for language related exception handling in ILIAS.
Class ilLanguageDetection.
static _getInstalledLanguages()