public interface Translator
Modifier and Type | Method and Description |
---|---|
boolean |
isAvailable() |
java.lang.String |
translate(java.lang.String text,
java.lang.String targetLanguage)
Translate text to the given language
This method attempts to auto-detect the source language of the text.
|
java.lang.String |
translate(java.lang.String text,
java.lang.String sourceLanguage,
java.lang.String targetLanguage)
Translate text between given languages.
|
java.lang.String translate(java.lang.String text, java.lang.String sourceLanguage, java.lang.String targetLanguage) throws TikaException, java.io.IOException
text
- The text to translate.sourceLanguage
- The input text language (for example, "en").targetLanguage
- The desired language to translate to (for example, "fr").TikaException
- When there is an error translating.java.io.IOException
java.lang.String translate(java.lang.String text, java.lang.String targetLanguage) throws TikaException, java.io.IOException
text
- The text to translate.targetLanguage
- The desired language to translate to (for example, "hi").TikaException
- When there is an error translating.java.io.IOException
boolean isAvailable()
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"