Microsoft Translator, a Cognitive Services offering from Microsoft Cloud and Enterprise division, provides a scalable, compliant, and customizable neural machine translation cloud service. Supporting over 60 languages, Translator can be used to build applications, websites, tools, or any solution requiring multi-language support. Built for business, Microsoft Translator technology powers translation features across Microsoft products, including Microsoft Translator apps, Office, Edge, SharePoint, Yammer, Visual Studio, Bing, and Skype. By simply integrating translation into web, desktop, or mobile applications, using industry standard REST technology, the Translator API provides a rich functionality set for any developer.
Leverage the latest in modern neural machine translation technology to translate between languages. Whether a chat application or support desk agent ticket system, you'll have translation power of the new Microsoft Translator API. This function is compatible with ChatEngine, an open and extensible chat SDK and APIs for building powerful 1:1 and group chats quickly.
Your original source message will contain two important strings: "text" and "language". Inside the "text"
string include your message to be translated. Next you will specify your target translation languages. You can specify more than one language! When specifying the "language"
string, you may delimit the language codes with a ',' comma. Try a target languages like "zh"
for Mandarin. And target the language to be both Mandarin and Spanish "zh,es"
.
{ "text" : "Hello", "language" : "zh,es" }
Note that your original "text" string is left intact. You'll see a new "data"
object in your JSON message with your requested target translations inside! There is a bonus object too. The "detectedLanguage"
object contains the estimated source language you provided. A "score"
integer is included based on the estimated accuracy. A score of "score": 1
is a good score. Your translations will be inside the "translations"
array. Each element of this array contains each of the translations you requested in your target "language" string. You are able to change any part of the response objects format. Click "Try it now" to install this function in your PubNub dashboard.
{ "text" : "Hello", "language" : "zh,es", "data" : { "translation": { "detectedLanguage": { "language": "en", "score": 1 }, "translations": [ { "text": "你好", "to": "zh-Hans" }, { "text": "Hola", "to": "es" } ] }, "text": "你好" } }
Need help? Contact PubNub Support.
Copyright (c) 2018 PubNub
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Fast, high-quality, and affordable neural machine translation service
Learn more