Translator Api
Interface for a translation API that translates text from one language to another. The implementation provides two methods: translate and translateInternal.
The translate method is the entry point, which is a public method that automatically detects the source language (unless specified) and translates the input text into a target language. The translateInternal method is the lower-level internal logic that handles the actual translation work.
The API ensures that the provided text is not empty before attempting to perform the translation.
Inheritors
Functions
Translates the provided text from a source language to a target language. The source language is auto-detected by default, and the target language is defined by the targetLanguage parameter.
Internal method that performs the actual translation from one language to another. This method is used by the translate method and is not meant to be called directly by consumers.