Class TranslationService

java.lang.Object
sk.iway.iwcm.system.translation.TranslationService

public class TranslationService extends Object
Vseobecna trieda pre preklad textov, vyzaduje konfiguraciu prekladaca, aktualne je podporovany DeepL
  • Constructor Details

    • TranslationService

      public TranslationService(String fromLanguage, String toLanguage)
  • Method Details

    • translate

      public String translate(String text)
      Translate text from one language to another using the configured translation engine and languages set in constructor.
      Parameters:
      text -
      Returns:
    • translate

      public String translate(String text, String fromLanguage, String toLanguage)
      Translate text from one language to another using the configured translation engine.
      Parameters:
      text -
      fromLanguage -
      toLanguage -
      Returns:
    • getTranslationInfo

      public static TranslationEngineInfo getTranslationInfo()
    • getFromLanguage

      public String getFromLanguage()
    • getToLanguage

      public String getToLanguage()
    • getTranslationEngine

      public TranslationEngine getTranslationEngine()
    • setFromLanguage

      public void setFromLanguage(String fromLanguage)
    • setToLanguage

      public void setToLanguage(String toLanguage)
    • setTranslationEngine

      public void setTranslationEngine(TranslationEngine translationEngine)