src/Sulu/Bundle/PageBundle/Controller/NodeController.php
private function getLanguage(Request $request)
    {
        $locale = $this->getRequestParameter($request, 'locale', false, null);

        if ($locale) {
            return $locale;
        }

        return $this->getRequestParameter($request, 'language', true);
    }
private function getLanguage(Request $request)
    {
        $locale = $this->getRequestParameter($request, 'locale', false, null);

        if ($locale) {
            return $locale;
        }

        return $this->getRequestParameter($request, 'language', true);
    }
private function getLanguage ( Request $ request ) { $ locale = $ this -> getRequestParameter ( $ request , 'locale' , false , null ) ; if ( $ locale ) { return $ locale ; } return $ this -> getRequestParameter ( $ request , 'language' , true ) ; }
returns language code from request.

@param Request $request

@return string
returns language code from request .