contao/core — Issue #3877: session TL_LANGUAGE should be set by default right after langconfig.php is loaded
Author: davorgit
Created: 2012-01-30 13:55:16+00:00
State: open

to get current language i.e. in cron operation you must create workaround like this:

langconfig.php
$_SESSION['TL_LANGUAGE'] = $GLOBALS['TL_LANGUAGE'];

this is useful for loading language files in cron job:
$this->loadLanguageFile('default',$_SESSION['TL_LANGUAGE']);