Jump to content

Photo
- - - - -

[CometChat] Break down the language barrier: Announcing real-time message transl


  • Please log in to reply
No replies to this topic

#1 Newsbot

Newsbot

    Automated News Grabber

  • Members
  • Level
  • 183 points
  • 717 posts
    • Gender:Not Telling


Users Awards

Posted 28 October 2019 - 12:38 PM

The internet has connected the world in ways which no one could have imagined. How else could someone from Wales 🇬🇧 meet and talk with someone from Mumbai 🇮🇳 if not for an online chat?

And while many people in Mumbai speak excellent English, many do not. It makes you wonder - how many more people would be chatting if language was not an obstacle? Could your chat application reach more people if no such language barrier existed?

We think so. After all, if Google Translate translates 100 billion words a day, there must be a demand. But 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 participate in the conversation. Automated, real-time translation is the solution.

Announcing real-time message translation

I am pleased to announce a new extension for Android, iOS, and the web (JavaScript) which enables you to instantly translate messages. It works in 3 simple steps:

  1. Enable the extension in your dashboard
  1. When sending a message describe which languages you would like to translate the message into:

    const message = new CometChat.TextMessage(
        "Anant", "Hi", CometChat.RECEIVER_TYPE.USER)
    
    const metadata = {
      "message_translation_languages": ["en","hi","ru"]
    }
    message.setMetadata(metadata)
    
    CometChat.sendMessage(message).then(() => console.log("success"))
    
  1. On the client, you will now see one or more translations alongside each message:
    "@injected": {
        "extensions": {
          "message-translation": {
            "translations": [
              {
                "message_translated": "हैलो दुनिया",
                "language_translated": "hi"
              },
              {
                "message_translated": "привет мир",
                "language_translated": "ru"
              }
            ],
            "language_original": "en"
          }
        }
      }
    

CometChat handles the translation of the messages and puts the result exactly where you expect it – right alongside the original message and message metadata. You won't have to create additional requests, coordinate your own platform, or set up processing services. And you've got complete control over how you want to render the message. Perhaps you'll translate the message immediately, like we do in this video:

Or perhaps you take a page from Viber’s books and offer a slick tap to Translate button:

https://www.viber.co...chat-instantly/

In other apps, a Translate button like this would send off a request, show a loading indicator before finally rendering the translated text. With our extension, the data is already available in the message metadata where the translated message could be accessed and therefore rendered instantaneously, creating a seriously slick user experience.

Another way to delight your users is by anticipating their preferred language. With CometChat, it’s possible to associate metadata, like a preferred language, with a user. (This might look something like user.metadata.preferredLanguage, depending on what you call the property.) Based on this data, you can automatically request the message to be translated according to the recipient’s preference. Now, that's seriously thoughtful! Rest assured, there’s no limit to the number of messages you can translate and it doesn’t slow the conversation down.



View the full article...




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users


All the resources listed here are just for testing purpose and they shouldn't be used at any commercial environment without a valid license.
Those are for users who wants to try them before buy. Help the developer to build it better by purchasing them from original authors.