public Boolean isEnglish(String content) {
        try {

            if (content == null || content.isEmpty()) {
                return false;
            }

            Detector detector = DetectorFactory.create();
            detector.append(content);
            ArrayList<Language> langs = detector.getProbabilities();

            if (langs.size() == 0) {
                return false;
            }

            for (Language l : langs) {
                if (l.lang.equals("en")) {
                    return true;
                }
            }
            return false;
        } catch (Exception ex) {
            logger.warn("Problem while detecting language in text: " + content, ex);
            return false;
        }
    }
Try to detect the language of the text in the String.

@param page
@return true if the String contains English language, false otherwise
ache/src/main/java/achecrawler/util/LangDetection.java