Translation is the process of converting text from one language to another while preserving its meaning. This task is essential for breaking down language barriers and enabling communication across different cultures. Running Translation withDocumentation Index
Fetch the complete documentation index at: https://docs.supercontrast.com/llms.txt
Use this file to discover all available pages before exploring further.
supercontrast is straightforward. You need to provide the text to translate, specify the source and target languages, and choose the provider you want to use.
In this example, we’ll use Task.TRANSLATION with Provider.AZURE (Microsoft’s Azure Translator service) to translate text from English (source_language="en") to French (target_language="fr").
Note: Language codes can be found here.
Task.TRANSLATION, the request schema is defined by TranslationRequest and the response schema is defined by TranslationResponse.
TranslationRequest
text: a string of the text to be translated.
text: a string of the translated text