function detectLanguage()

in src/translator.js [76:81]


function detectLanguage(text, detectAll) {
    if (!text || !(text = text.trim())) {
        return;
    }
    return detectAll ? franc.all(text) : franc(text);
}