Integration spotlight: Microsoft Translator Text

Overview

You can use our Microsoft Translator Text integration to not only translate a text from language from another, but also to get alternative translations for words, and even transliterate scripts!

Functions

Function Description
DETECT_LANGUAGE_MICROSOFT Detect the language of a text.
LANGUAGES_MICROSOFT Get a list of supported languages.
TRANSLATE_ALTERNATIVES_MICROSOFT Get alternative translations for a word.
TRANSLATE_MICROSOFT Translate a text.
TRANSLITERATE_MICROSOFT Convert text from one script to another.

DETECT_LANGUAGE_MICROSOFT

Use DETECT_LANGUAGE_MICROSOFT to automatically find the two-letter language code of a text. You can use the short parameter to also get the confidence score of the detection.

Syntax

DETECT_LANGUAGE_MICROSOFT(text, [short])

Parameter Mandatory Description
text Yes The text you want to get the language for. For example: "The quick brown fox".
short No Boolean indicating whether or not to return additional information for the language detection. Choose either:
- TRUE to get the language only (default)
- FALSE to get additional information

Examples

Detect language example

LANGUAGES_MICROSOFT

Use LANGUAGES_MICROSOFT to get a list of the currently supported languages by the Microsoft Translator Text API. You can further narrow it down by designating scope which returns only the languages supported for that action.

Syntax

LANGUAGES_MICROSOFT([scope])

Parameter Mandatory Description
scope No Filters the language list by a group type. Choose either:
- "translation"
- "transliteration"
- "dictionary"

Examples

To get all the language Microsoft supports:

=LANGUAGES_MICROSOFT()

To get all the language Microsoft supports for transliteration:

=LANGUAGES_MICROSOFT("transliteration")

Languages example

TRANSLATE_ALTERNATIVES_MICROSOFT

You can use TRANSLATE_ALTERNATIVES_MICROSOFT to find alternate translation for select words or idiomatic phrases. You can also use our Translations recommended table to quickly get all the responses into a table.

Syntax

TRANSLATE_ALTERNATIVES_MICROSOFT(text, source, target)

Parameter Mandatory Description
text Yes The word or idiomatic phrase to translate. For example: "Goodbye".
source Yes The target language of the translation. For example: "de".
target Yes The target language of the translation. For example: "de".

Examples

To get the alternate translation of Guten morgen in English:

=TRANSLATE_ALTERNATIVES_MICROSOFT("Guten morgen","de","en")

Translate alternatives example

TRANSLATE_MICROSOFT

Use TRANSLATE_MICROSOFT to simply translate a body of text from one language to another. You can also choose what format the source text is is, what to do with profanities, define the laguage scripts, and even use your Custom Translator instance.

Syntax

TRANSLATE_MICROSOFT(text, [source], [target], [short], [format], [profanity_action], [profanity_marker], [suggested_from], [from_script], [to_script], [category])

Parameter Mandatory Description
text Yes The text to translate. For example: "The quick brown fox".
source No The source language of the text. For example: "en".If blank, the language is detected automatically.
target No The target language (the language you want the text to be translated into). For example: "de".By default, translates to English.
short No A Boolean value indicating whether to return just the text. Choose either:
- TRUE (default) to get just the text
- FALSE to get the text along with additional data
format No The format of the text. Choose either:
- "text" (default) for plain text
- "html" for HTML text
profanity_action No How to treat profanities. Choose either:
- "NoAction" (default) to translate the profanity
- "Marked" to mark the profanity in the translation
- "Deleted" to delete the profanity from the translation
profanity_marker No How to mark the profanities. Choose either:
- "Asterisk" (default) to replace the profanity with asterisks
- "Tag" to surround the profanity with a <profanity> HTML element.
suggested_from No The fallback language to use if auto-detecting the from language does not work. For example: "en".
from_script No The script of the source text. For example: "Taml" for Tamil.
to_script No The script of the target text. For example: "Latn" for Latin.
category No The Category ID of your Custom Translator.

Examples

To translate The quick brown fox. from English to Portuguese:

=TRANSLATE_MICROSOFT("The quick brown fox.","en","pt")

To translate The stupid quick brown fox. from English to Portuguese, and censoring the profanity (stupid is considered a profanity by Microsoft Translator):

=TRANSLATE_MICROSOFT("The stupid quick brown fox.","en","pt",,,"Marked")

Translate example

TRANSLITERATE_MICROSOFT

Use TRANSLITERATE_MICROSOFT to convert a text from one script to another. For example, you can convert an Thai-script word into its Latin-script equivalent.

Syntax

TRANSLITERATE_MICROSOFT(text, language, from_script, to_script)

Parameter Mandatory Description
text Yes The text to be converted. For example "مرحبًا".
language Yes lThe anguage of the text to convert from one script to another. For example: "ar".
from_script Yes The script used by the input text. For example: "Arab".
To get the script code, use LANGUAGES_MICROSOFT("transliteration").
to_script Yes The script you want to transliterate to. For example: "Latn".
To get the script code, use LANGUAGES_MICROSOFT("transliteration").

Examples

To transliterate สวัสดี (Hello in Thai) to Latin script:

=TRANSLITERATE_MICROSOFT("สวัสดี","th","thai","Latn")

Transliterate example

Summary

And just like that, you’ll be able to communciate with anyone with ease (well, in text at least). Try our Translate text with Microsoft template if you want to get a quick headstart on it!

Now, चलो कुछ बनाते हैं :rocket:!

P.S. - we sincerely hope that means "Let’s build something in Hindi.