public function getLanguageKey()
    {
        $languageKey = 'unknown';

        if ($this->environmentService->isEnvironmentInFrontendMode()) {
            $pageController = Core::get()->getPageController();

            if (isset($pageController->config['config']['language'])) {
                $languageKey = $pageController->config['config']['language'];
            }
        } else {
            $backendUser = Core::get()->getBackendUser();

            if (strlen($backendUser->uc['lang']) > 0) {
                $languageKey = $backendUser->uc['lang'];
            }
        }

        return $languageKey;
    }