public boolean contains(String text, String targetLanguage) {
        try {
            LanguageResult language = detectLanguage(text);
            String sourceLanguage = language.getLanguage();
            return contains(text, sourceLanguage, targetLanguage);
        } catch (IOException e) {
            // TODO what to do if we get an error?
            return false;
        }
    }
Check whether this CachedTranslator's cache contains a translation of the text to the target language,
attempting to auto-detect the source language.

@param text           What string to check for.
@param targetLanguage The target language of translation.
@return true if the cache contains a translation of the text, false otherwise.
tika-translate/src/main/java/org/apache/tika/language/translate/impl/CachedTranslator.java