@Override
    public String translate(String text, String sourceLanguage, String targetLanguage)
            throws TikaException, IOException {
        if (translator == null) {
            return text;
        }
        LRUMap<String, String> translationCache =
                getTranslationCache(sourceLanguage, targetLanguage);
        String translatedText = translationCache.get(text);
        if (translatedText == null) {
            translatedText = translator.translate(text, sourceLanguage, targetLanguage);
            translationCache.put(text, translatedText);
        }
        return translatedText;
    }
@param translator the translator to set
tika-translate/src/main/java/org/apache/tika/language/translate/impl/CachedTranslator.java