Microsoft Text Translate API V3 module for nodejs
Microsoft Translator API Reference
Methods
getLanguages
. Gets the set of languages currently supported by other operations of the Translator Text API.translate
. Translates text.transliterate
. Converts text in one language from one script to another script.detectLanguage
. Identifies the language of a piece of text.breakSentence
. Identifies the positioning of sentence boundaries in a piece of text.lookupDictionary
. Provides alternative translations for a word and a small number of idiomatic phrases.dictionaryExamples
. Provides examples that show how terms in the dictionary are used in context.
Installation
$ npm i microsoft-text-translator
An API key from portal.azure.com is needed to initialize client.
Example usage - Translate
const translator = credentials: subscriptionKey: '' ;const translation = await translator;
Example usage - Transliterate
const translator = credentials: subscriptionKey: '' ;const transliteration = await translator;
Example usage - Detect language
const translator = credentials: subscriptionKey: '' ;const detect = await translator;
Example usage - Break sentence
const translator = credentials: subscriptionKey: '' ;const breaksentence = await translator;
Example usage - Dictionary Lookup
const translator = credentials: subscriptionKey: '' ;const lookup = await translator;
Example usage - Dictionary examples
const translator = credentials: subscriptionKey: '' ;const examples = await translator;