Translation
Uses Microsoft’s Azure Cognitive Services API to translate text. For more information, check out https://azure.microsoft.com/en-us/pricing/details/cognitive-services/translator-text-api/.
Terms of use: https://www.microsoft.com/en-us/servicesagreement
RPCS
- Translation.detectLanguage(text: String)
Attempt to detect language of input text
Arguments:
text: String
(String) - Text in an unknown language
Returns:
String
(String) - Abbreviation for name of language detected in text
- Translation.getSupportedLanguages()
Attempt to detect language of input text
Returns:
List
(List) - List of languages supported by the translator
- Translation.toEnglish(text: String)
Translate text to English
Arguments:
text: String
(String) - Text in another language
Returns:
String
(String) - Text translated to English
- Translation.translate(text: String, from: String?, to: String)
Translate text between languages
Arguments:
text: String
(String) - Text in another languagefrom: String?
(String) - Language to translate from (auto-detects if not specified)to: String
(String) - Language to translate to
Returns:
String
(String) - Text translated to requested language