Class Translator
java.lang.Object
com.codename1.ai.language.Translator
On-device translation with lazily installed language-pair models.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic booleanisSupported(LanguageOptions options) static AsyncResource<String> translate(String text, String sourceLanguage, String targetLanguage, LanguageOptions options)
-
Method Details
-
isSupported
public static boolean isSupported() -
isSupported
-
translate
public static AsyncResource<String> translate(String text, String sourceLanguage, String targetLanguage, LanguageOptions options)
-