Recently we announced instant message translation - an impactful CometChat extension that enables you to smash the language barrier within your chat app. Current CometChat users can turn on the extension today ✨.

How does instant message translation work with CometChat?

In case you are unfamiliar - CometChat is a platform that enables you to build chat impressive features in your  applications. Here is a simplistic example CometChat application (and an illustration of how instant message translation works):

// Import & login
import { CometChat } from "@cometchat-pro/chat"
const me = await CometChat.login("bookercodes", "EXAMPLE TOKEN")

// Subscribe to messages sent in #General
CometChat.addMessageListener("#General", new CometChat.MessageListener({
  onTextMessageReceived: message => console.log(message)
}))

// Send message to the #General channel
const message = new CometChat.TextMessage(
  "#General", "Hello world", CometChat.RECEIVER_TYPE.GROUP);
try {
  await CometChat.sendMessage(message);
} catch (error) {
  console.error(error)
}

A message normally looks like this:

{
    "sender": "Alex",
    "text": "Hello all"
}

In case you want to enable instant message translation you can do some minimal configuration (no back-end coding required) and we will inject the translated text alongside the message where it is convenient to access in your front-end code:

{
    "sender": "Alex",
    "text": "Hello all"

    "@injected": {
        "extensions": {
          "message-translation": {
            "translations": [
              {
                "message_translated": "हैलो दुनिया",
                "language_translated": "hi"
              },
              {
                "message_translated": "привет мир",
                "language_translated": "ru"
              }
            ],
            "language_original": "en"
            }
        }
    }
}

For the nitty gritty details check out the announcement or documentation for your platform:

And so why should you add instant message translation to your application? Here are 5 compelling reasons.

Why Message Translation Matter

  1. Having to copy and paste messages to an external translation service is unmanageable for your users, especially in a group chat. It simply takes too much time to let them take part in the conversation, which could very well have moved on by the time it took to understand the message. Automated, instant translation is the solution.
  2. The hard truth? Users are spoiled for choice and if your chat experience isn’t great, the only thing people will use it for is to share their username on another, more compelling platform. At CometChat, we’re not just building the best chat platform on the market today, we’re looking ahead. We anticipate the trends and identify the gaps for features your competitors don’t have – features that will give you the competitive advantage. There is a reason certain chat applications like Viber and WeChat resonate more with international audiences. Instant translation gives you an opportunity to compete like you couldn’t before.
  3. We don’t have all the data, though, so we can’t tell you just how many deals marketplaces and service companies like Airbnb are missing out on because of the language barrier.
  4. It’s not just about business. Online communities are thriving and Instant translation allows everyone to explore new cultures, meet new people, and, ultimately, smash the language barrier
  5. At launch we support we support translation between the following 25 languages: Arabic, Chinese (Simplified), Chinese (Traditional), Czech, Danish, Dutch, English, Finnish, French, German, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Malay, Norwegian, Persian, Polish, Portuguese, Russian, Spanish, Swedish, and Turkish.