diff --git a/libraries/cms/application/administrator.php b/libraries/cms/application/administrator.php index a819d1a0ffe43..a2906446b0b39 100644 --- a/libraries/cms/application/administrator.php +++ b/libraries/cms/application/administrator.php @@ -328,9 +328,13 @@ public function login($credentials, $options = array()) if (!($result instanceof Exception)) { - $lang = $this->input->getCmd('lang', 'en-GB'); - $lang = preg_replace('/[^A-Z-]/i', '', $lang); - $this->setUserState('application.lang', $lang); + $lang = $this->input->getCmd('lang'); + + if (strlen($lang)>0) + { + $lang = preg_replace('/[^A-Z-]/i', '', $lang); + $this->setUserState('application.lang', $lang); + } static::purgeMessages(); }