public function validLang($lang)
    {
        if (in_array($lang, $this->validLanguages)) {
            return $lang;
        }
        if ($this->defaultLanguage) {
            return $this->defaultLanguage;
        }
        return false;
    }
public function validLang($lang)
    {
        if (in_array($lang, $this->validLanguages)) {
            return $lang;
        }
        if ($this->defaultLanguage) {
            return $this->defaultLanguage;
        }
        return false;
    }
public function validLang ( $ lang ) { if ( in_array ( $ lang , $ this -> validLanguages ) ) { return $ lang ; } if ( $ this -> defaultLanguage ) { return $ this -> defaultLanguage ; } return false ; }
Check if the current language is a valid language.

@param string $lang Language
@return mixed.
Check if the current language is a valid language .