External APIs

IBM Watson: Language Translator

Translate and publish text in realtime for 11 different languages
Back to BLOCKS

About IBM Watson: Language Translator

Language Translator from IBM Watson provides an API for translating and publishing text for 11 different languages.

The IBM Watson Translator block allows you to translate text, whether it's as short as a chat messages or long as a news article, and deliver it to any number of subscribers, in realtime.

Try it Now
External APIs External APIs
Chat & Social
Chat & Social
Last Updated:
20160801 at 17:10:40
Event Handler Author:


This block enables communication between multiple participants in their native languages. It supports English, French, and Spanish but with some modifications to the block code, additional languages can be supported easily.

Every participant publishes to the same channel but listens on their language's specific channel.

A message is sent to the input channel. Then it is translated using IBM Watson API, and rebroadcast over the English, French, and Spanish channels. For example, if a user were to speak french, they would publish their message over the pubnub-chat channel and subscribe to messages on the pubnub-chat-fr channel.

Multilingual translation can be especially useful for use-cases like customer support, social apps etc.

To learn more about IBM Watson language Translator API and get your own API credentials, visit the IBM Watson Language Translator API homepage.


Publish a message text on the input channel. Input Channel: pubnub-chat
    "text": "Hi", 
    "input_lang": "en"

Output (french)

Message is translated and published on a channel for that language. This example is translated into french. Each language supported by block has its own channel. Output Channel: pubnub-chat- + <lang>
    "text": "bonjour", 
    "input_lang": "en"