MicrosoftTranslator: Translate text with Microsoft Translation API

1.Introduction

Description: Extension to translate text with Microsoft Translation API
Released: 2022-05-01T18:30:00Z
Last Updated: 2022-05-01T18:30:00Z
Permissions: android.permission.INTERNET

Thanks to @Point for sponsoring the extension.

2.Blocks

image

image

3.Documentation

Docs for: MicrosoftTranslator

Events

GotError

Event raised when an error occurs
Params

functionName | text
errorMessage | text


GotLanguagesList

Event raised after getting language's list
Params

namesList | any
nativeNamesList | any
langCodesList | any


GotTranslation

Event raised after getting translation
Params

responseDictionary | dictionary


GotTranslationWithLang

Event raised after getting response of 'TranslateWithLangDetection' method
Params

language | text
score | text
responseDictionary | dictionary


LanguageDetected

Event raised after detecting language
Params

language | text
score | text
isTranslationSupported | boolean


Methods

DetectLanguage

Detects language of given text
Params

text | text


GetLanguagesList

Gets a list of all supported languages

Translate

Translates given text into target language
Params

srcLang | text

text | text

toLangList | text


TranslateWithLangDetection

Translates text with language detection
Params

text | text

toLangList | text


Properties

ResourceLocation

Sets resource location

Property Type : read-write
Accepts : text


SubscriptionKey

Sets subscription api key

Property Type : read-write
Accepts : text


4.Usages

Trasnslate text into single language
image
*You can translate text into multiple languages by providing a csv list of language codes

Detect Text Language
image

Please read:

5.Downloads

The extension is open source:

6.Liked my work?

You can donate some amount to keep me motivated. :hugs:

Hope it helps! :slightly_smiling_face:

10 Likes

It does help (a lot). :wink:

1 Like

Nice work :+1:

Any usage restrictions or quotas ?

Details on how to get a subscription key ?

2 Likes

Yes, there are few restrictions on character limit per request, but there is no limit of no. of requests, fortunately.

It can be found here:

Thank you. :hugs:

3 Likes

I am a nooby with MIT Inventor Extensions. Can you explain to me how to get the API Key?

See the procedure in Quickstart in post number 4 and follow the directions:
You need an active Azure subscription. If you don't have an Azure subscription, you can create one for free

  • Once you have your Azure subscription, create a Translator resource in the Azure portal.
  • After your resource deploys, select Go to resource and retrieve your key and endpoint.

Hello SteveJG:

Thank you for answering.

I went to create an account but is asking me for a credit card and says the services are free for 12 months. I do not know if Translation is one of the free for 12 months or free for ever on Tier 0.

So I wont risk it.

Thank you again

It is free only for 12 months.
After that you pay according to usage.