Translation
Have seamless cross-language conversations by specifying source and target language codes in the message metadata, ensuring real-time translations between speakers of different languages
You can provide a chat experience between speakers of two different languages by simply specifying the language codes when sending a message and using the i18n
payload of a message to render translations in your chat application. You must set sourceLanguageCode
and targetLanguageCodes
in the metadata
of the message.
An message.i18n.updated
event will be published for each completed translation and the message will have a populated i18n
key, that in our example will look like this:
The message.i18n.updated
events will always come after the message.new
event. Translations are generated asynchronously and so you should handle this in your user interface appropriately.
See Supported Language Codes for languages that are currently supported.
Last updated