protected function getDefaultLanguage($rootPageId)
    {
        $siteDefaultLanguage = 0;

        $configuration = Util::getConfigurationFromPageId($rootPageId, 'config');

        $siteDefaultLanguage = $configuration->getValueByPathOrDefaultValue('sys_language_uid', $siteDefaultLanguage);
        // default language is set through default L GET parameter -> overruling config.sys_language_uid
        $siteDefaultLanguage = $configuration->getValueByPathOrDefaultValue('defaultGetVars.L', $siteDefaultLanguage);

        return $siteDefaultLanguage;
    }