4 require_once
'Services/Language/classes/class.ilLanguage.php';
5 require_once
'Services/Language/classes/class.ilLanguageDetectorFactory.php';
30 public function detect()
38 $detected_language = $installed_languages[0];
40 foreach ($this->factory->getValidInstances() as $detector) {
42 $language = $detector->getIso2LanguageCode();
43 if (in_array($language, $installed_languages)) {
44 $detected_language = $language;
47 $ilLog->write(__METHOD__ .
' ' . $e->getMessage());
51 return $detected_language;
Class ilLanguageDetectorFactory.
Class for language related exception handling in ILIAS.
Class ilLanguageDetection.
static _getInstalledLanguages()