public function getLanguage()
    {
        if (!is_array($this->languages)) {
            LanguageDetector::detect($this, $this->getAcceptLanguage());
        }

        return strtolower(substr(reset($this->languages), 0, 2));
    }
public function getLanguage()
    {
        if (!is_array($this->languages)) {
            LanguageDetector::detect($this, $this->getAcceptLanguage());
        }

        return strtolower(substr(reset($this->languages), 0, 2));
    }
public function getLanguage ( ) { if ( ! is_array ( $ this -> languages ) ) { LanguageDetector :: detect ( $ this , $ this -> getAcceptLanguage ( ) ) ; } return strtolower ( substr ( reset ( $ this -> languages ) , 0 , 2 ) ) ; }
Get a user's language.

@return string
Get a user s language .