Interface Translator


public interface Translator
The Translator interface defines the contract for translating text between locales. Implementations of this interface provide specific translation capabilities using different translation services or mechanisms.
  • Method Summary

    Modifier and Type
    Method
    Description
    Translates text based on the provided translation context.
  • Method Details

    • translate

      String translate(TranslationContext context) throws Exception
      Translates text based on the provided translation context.
      Parameters:
      context - The translation context containing source text, source locale, target locale, and other relevant information
      Returns:
      The translated text
      Throws:
      Exception - If an error occurs during the translation process