lib/DetectLanguage/DetectLanguage.php
public static function simpleDetect($text)
    {
        $detections = self::detect($text);

        if (count($detections) > 0)
            return $detections[0]->language;
        else
            return null;
    }
public static function simpleDetect($text)
    {
        $detections = self::detect($text);

        if (count($detections) > 0)
            return $detections[0]->language;
        else
            return null;
    }
public static function simpleDetect ( $ text ) { $ detections = self :: detect ( $ text ) ; if ( count ( $ detections ) > 0 ) return $ detections [ 0 ] -> language ; else return null ; }
Simple detection. If you need just the language code.

@static
@param string @text The text for language detection
@return string detected language code
Simple detection . If you need just the language code .