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;
    }
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;
    }
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 ; }
Retrieves the default language by the rootPageId of a site.

@param int $rootPageId
@return int|mixed
Retrieves the default language by the rootPageId of a site .