Real-time message translation allows you to have a fluent conversation, regardless of what language the person you’re chatting with speaks. A study by CSA Research shows that 65% of respondents prefer content that’s in their own language, and 75% are more likely to purchase from a brand if it offers localized customer care. In sectors such as international marketplaces, global customer support, education, healthcare, shipping and logistics, and of course travel and tourism, a real-time translator enables frictionless communication. By removing the need for any laborious process of manual translation, live chat translation offers users a better experience, and allows you to operate across languages while saving costs and time.
TalkJS chat offers both chat UI localization and automatic real-time message translation. Powered by the Google Cloud Translation API, it supports 36 languages. In this guide, researcher and technical writer Chris Meyns outlines the core use cases and benefits of real-time message translation with a chat API, how to set up translation in your TalkJS chat, and outlines pricing options.
Contents
- Use cases
- Benefits
- How to set up real-time message translation
- How much does real-time message translation cost?
- Break the language barrier for your users
Use cases
Whether you’re offering 1-1 chat, large group chat, or conversations involving AI chatbots, there's a range of relevant use cases for a real-time language translator. Here are some real-world examples.
Customer support
Real-time message translation allows you to scale and simplify your customer support, to serve users worldwide. For example, if you’re running an international online marketplace based in Brazil, you’ve likely set your default language to Brazilian Portuguese. With real-time message translation, you can engage customers from around the world, and all messages are automatically translated to and from Brazilian Portuguese—allowing you to operate more efficiently.
Education and language learning
Users who are learning a language can also greatly benefit from using real-time message translation. With a translation toggle added to a pre-built chat UI, someone from Botswana who’s learning Hindi can practice in the chat, and translate into their target language, while having the comfort of knowing that they can quickly check if they’re unsure. This can grow their confidence and help improve their overall language skills.
Healthcare
Fast and accurate diagnosis can be crucial in healthcare and medical settings to make sure that patients get the diagnosis and treatment they need. A medic in Tunisia can use a real-time translator app to get detailed, accurate information from someone who doesn’t speak Arabic. This way, healthcare professionals can support and offer effective care to all their patients, regardless of the patient’s primary language.
Shipping and logistics
Drivers and shippers can cross linguistic borders while speaking comfortably in their local language, using real-time translation. With translated message contents, a supplier in Panama can collaborate effortlessly with distributors and warehouse operators—whether they’re based in Manila, Dubai, or Rotterdam. Add to that chat UI localization, and you’re all set up for a global logistics operation.
Travel and tourism
Travel and tourism operators can use real-time message translation on their website, or a real-time chat translation app to best support travellers on their journeys. For example, with the right tools, someone from Haiti visiting Iceland will be able to directly find their way and chat with locals on the streets of Reykjavík, gaining a fully immersive travel experience.
Benefits
Using real-time message translation can have the following benefits:
- Save time and costs: Compared to the elaborate process of manual translation, real-time functions give you instant translation. It’s also a lot less involved, and cheaper. By using real-time translation, you can significantly reduce the time and costs spent on communication.
- Better experience: The less friction users face when using your chat, the more enjoyable their interactions. Real-time translation allows users to communicate effortlessly with anyone in their preferred language, making interaction more inclusive and engaging.
- Global scale: With real-time translation, you‘re no longer limited by language barriers. Instead, you can work with anyone, anywhere, regardless of their locale. This way, real-time translation sets you up for success when scaling your operations and partnerships across the globe.
How to set up real-time message translation
In TalkJS, you can set up real-time message translation for your chat in just three simple steps, as follows.
Step 1: Get a Google Cloud Translation API key
TalkJS uses Google’s Cloud Translation API to integrate message translation into your chat. Begin by obtaining a Cloud Translation API key, if you don’t have one already:
- Create a project in the Google Cloud Platform console, or navigate to your project if you already have one.
- Enable the Cloud Translation API for your project.
- On the API & Services Credentials page, select + Create credentials and choose API key.
- For your newly created API key, select the action Edit API key, and configure the key as follows:
- Name: Any name you want, for example ‘Real-time message translation’.
- Application restrictions: Select Websites.
- Website restrictions: Select + Add, enter https://app.talkjs.com, and select Done.
- API restrictions: Select Restrict key.
- Select APIs: Select Cloud Translation API.
- Select Save to save your changes.
- Enable billing for your project. Read more on how to enable billing for a project.
You now have a working Google Cloud Translation API key.
Step 2: Add your API key
Next, add your Cloud Translation API key to your TalkJS dashboard:
- Go to your Google Cloud APIs & Services credentials page.
- For your Cloud Translation API key, choose Show Key, and copy the key.
- Go to the Settings page of your TalkJS dashboard.
- In the Localization section, paste your API key in the field under the heading Google translate API key.
- Select Save localization settings to save your changes.
Your Cloud Translation API key has now been added to your TalkJS project.
Step 3: Enable real-time translation
Finally, enable translation in your chat. Translation settings are set per chat component, giving you full control over when translation is turned on or off. Here’s an overview of some of the options you have available, using the JavaScript SDK.
Translation option | Description | Code example |
---|---|---|
Show a translation toggle in the UI | To show a translation toggle, you can pass one of the following values for showTranslationToggle when creating a chat UI:
|
const chatbox = session.createChatbox({
showTranslationToggle: 'true',
}); |
Translate selected conversations | To translate only selected conversations, you can pass an array of conversation IDs to translateConversations when creating a chat UI. |
const chatbox = session.createChatbox({ translateConversations: ['conv_1', 'conv_2'], }); |
Automatically translate any multilingual conversation | To translate any conversations in which participants have different locales, you can pass 'auto' to translateConversations when creating a chat UI. |
const chatbox = session.createChatbox({ translateConversations: 'auto', }); |
Set translation for all conversations | To set the translation for all conversations, you can pass the following values to translateConversations when creating a chat UI:
|
const chatbox = session.createChatbox({ translateConversations: true, }); |
You’ve now set up real-time translation for your chat.
Read more on enabling real-time translation with the JavaScript SDK, or check out further set-up and customization options with Talk JS tutorials.
How much does real-time message translation cost?
Real-time message translation is included in the TalkJS Growth and Enterprise plans at no extra charge. That said, Google does charge for use of the Cloud Translation API. Here is an overview of Cloud Translation pricing for different translation options.
Translation option | Purpose | Price (in USD) |
---|---|---|
AutoML Translation Model Training Operations | Train custom translation models using your own datasets | $45.00 per hour |
AutoML Translation Online Predictions Operations | Translate text in real-time using your own custom models | Tier 1 Tier 2 Tier 3 Tier 4 |
AutoML Translation Model Online Prediction In Translation V3 Document Translation | Translate documents using your own custom models, using the Translation API V3 | $0.25 per count |
Language Detection | Automatically identify the language of a given text | $20.00 per 1M byte |
Adaptive MT Translation Input Characters | Translate text using Adaptive Machine Translation (MT), which adjusts translations based on user feedback, with charges based on input characters | $25.00 per 1M count |
Adaptive MT Translation Output Characters | Translate text using Adaptive Machine Translation (MT), which adjusts translations based on user feedback, with charges based on output characters | $25.00 per 1M count |
Neural Translation Model Predictions | Translate text using Neural Machine Translation (NMT) models | $20.00 per 1M count |
Neural Translation Model Predictions In Translation V3 | Translate text using Neural Machine Translation (NMT) models from the Translation API V3 | $20.00 per 1M count |
Translation LLM Input Characters | Translate text using the Translation Large Language Model (LLM), with charges based on input characters | $10.00 per 1M count |
Translation LLM Output Characters | Translate text using the Translation Large Language Model (LLM), with charges based on output characters | $10.00 per 1M count |
Neural Translation Model Online Prediction In Translation V3 Document Translation | Translate documents using Neural Machine Translation (NMT) models from the Translation API V3 | $0.08 per count |
Break the language barrier for your users
By removing language barriers you can scale your operations globally. With TalkJS’ chat UI localization and integrated real-time message translation you’ll give your users a better chat experience—and all the while save time and costs.
Are you ready to get started with real-time translation? Try TalkJS for free.