Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,6 @@ protected function initEnvironment(Setup\Environment $environment, \ilComponentR
public function __construct()
{
}
public static function getRootLogger(): ilLogger
{
return $GLOBALS["DIC"]["ilLog"];
}
public static function getLogger(string $a_component_id): ilLogger
{
return $GLOBALS["DIC"]["ilLog"];
Expand Down Expand Up @@ -188,7 +184,11 @@ public function __construct()
$GLOBALS["DIC"]["ilUser"] = new class () extends ilObjUser {
public function __construct()
{
$this->prefs["language"] = "en";
}

public function getLanguage(): string
{
return 'en';
}
};

Expand Down
5 changes: 4 additions & 1 deletion components/ILIAS/Language/classes/class.ilLanguage.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
use ILIAS\Language\ComponentTranslation\TranslationGettextRepository;
use ILIAS\Language\ComponentTranslation\TranslationRepository;
use ILIAS\Language\LanguageIdentifier;
use ILIAS\components\Logging\NullLogger;

/**
* language handling
Expand Down Expand Up @@ -112,7 +113,9 @@ public function __construct(string $a_lang_key, ?TranslationRepository $translat
$this->translations = $translations;
$client_ini = $DIC->clientIni();

$this->log = $DIC->logger()->forComponent('lang');
$this->log = isset($DIC['ilLoggerFactory'], $DIC['logging.factory'])
? $DIC->logger()->forComponent('lang')
: new NullLogger();

$this->lang_key = $a_lang_key;

Expand Down
Loading