public function getSiteContributionLanguage()
    {
        $currentLanguage = $this->getSite()['defaultLanguage'];

        $token = $this->tokenStorage->getToken();
        if ($token instanceof TokenInterface) {
            if (($user = $token->getUser()) instanceof UserInterface && $user->hasLanguageBySite($this->getSiteId())) {
                $currentLanguage = $user->getLanguageBySite($this->getSiteId());
            }
        }

        return $currentLanguage;
    }
public function getSiteContributionLanguage()
    {
        $currentLanguage = $this->getSite()['defaultLanguage'];

        $token = $this->tokenStorage->getToken();
        if ($token instanceof TokenInterface) {
            if (($user = $token->getUser()) instanceof UserInterface && $user->hasLanguageBySite($this->getSiteId())) {
                $currentLanguage = $user->getLanguageBySite($this->getSiteId());
            }
        }

        return $currentLanguage;
    }
public function getSiteContributionLanguage ( ) { $ currentLanguage = $ this -> getSite ( ) [ 'defaultLanguage' ] ; $ token = $ this -> tokenStorage -> getToken ( ) ; if ( $ token instanceof TokenInterface ) { if ( ( $ user = $ token -> getUser ( ) ) instanceof UserInterface && $ user -> hasLanguageBySite ( $ this -> getSiteId ( ) ) ) { $ currentLanguage = $ user -> getLanguageBySite ( $ this -> getSiteId ( ) ) ; } } return $ currentLanguage ; }
Get the contribution language setted by the user for the current site

@return string
Get the contribution language setted by the user for the current site