public function getBackOfficeLanguage()
    {
        $currentLanguage = $this->session->get(self::KEY_LOCALE);

        if (!$currentLanguage) {
            $currentLanguage = $this->defaultLocale;
            $token = $this->tokenStorage->getToken();
            if ($token && ($user = $token->getUser()) instanceof UserInterface) {
                if (null !== $user->getLanguage()) {
                    $currentLanguage = $user->getLanguage();
                }
                $this->setBackOfficeLanguage($currentLanguage);
            }
        }

        return $currentLanguage;

    }
public function getBackOfficeLanguage()
    {
        $currentLanguage = $this->session->get(self::KEY_LOCALE);

        if (!$currentLanguage) {
            $currentLanguage = $this->defaultLocale;
            $token = $this->tokenStorage->getToken();
            if ($token && ($user = $token->getUser()) instanceof UserInterface) {
                if (null !== $user->getLanguage()) {
                    $currentLanguage = $user->getLanguage();
                }
                $this->setBackOfficeLanguage($currentLanguage);
            }
        }

        return $currentLanguage;

    }
public function getBackOfficeLanguage ( ) { $ currentLanguage = $ this -> session -> get ( self :: KEY_LOCALE ) ; if ( ! $ currentLanguage ) { $ currentLanguage = $ this -> defaultLocale ; $ token = $ this -> tokenStorage -> getToken ( ) ; if ( $ token && ( $ user = $ token -> getUser ( ) ) instanceof UserInterface ) { if ( null !== $ user -> getLanguage ( ) ) { $ currentLanguage = $ user -> getLanguage ( ) ; } $ this -> setBackOfficeLanguage ( $ currentLanguage ) ; } } return $ currentLanguage ; }
Get current back office language

@return string
Get current back office language