Class BaseCachedTranslate
java.lang.Object
org.omegat.core.machinetranslators.BaseTranslate
org.omegat.core.machinetranslators.BaseCachedTranslate
- All Implemented Interfaces:
IMachineTranslation
Base class for machine translation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal @Nullable StringgetCachedTranslation(Language sLang, Language tLang, String text) Get cached translation.final @Nullable StringgetTranslation(Language sLang, Language tLang, String text) Translate.Methods inherited from class org.omegat.core.machinetranslators.BaseTranslate
isEnabled, setEnabled, setGlossarySupplierMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.omegat.gui.exttrans.IMachineTranslation
getName, isConfigurable, isEnabled, setEnabled, setGlossarySupplier, showConfigurationUI
-
Constructor Details
-
BaseCachedTranslate
public BaseCachedTranslate()
-
-
Method Details
-
getTranslation
@Nullable public final @Nullable String getTranslation(Language sLang, Language tLang, String text) throws Exception Description copied from interface:IMachineTranslationTranslate.- Specified by:
getTranslationin interfaceIMachineTranslation- Overrides:
getTranslationin classBaseTranslate- Parameters:
sLang- source languagetLang- target languagetext- text for translation- Returns:
- translated text, or null if translation impossible
- Throws:
Exception
-
getCachedTranslation
@Nullable public final @Nullable String getCachedTranslation(Language sLang, Language tLang, String text) Description copied from interface:IMachineTranslationGet cached translation. Returns null if translation not present.- Specified by:
getCachedTranslationin interfaceIMachineTranslation- Overrides:
getCachedTranslationin classBaseTranslate- Parameters:
sLang- source languagetLang- target languagetext- text for translation- Returns:
- translated text, or null if translation impossible
-