Hello team,
We are building Zendesk App which will be having language translate chat message functionality. I have a requirement to change/modify incoming/outgoing chat between agent and visitor.
as per below:

Is there any API or way to achieve this?
I have tried
1. https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/#update-chat but it don't allow me to change original message.
Reference links for case scenario:
https://www.zendesk.com/marketplace/apps/chat/820227/systran-translation-for-chat/
https://www.zendesk.com/marketplace/apps/support/780142/language-io-chat--tickets-translation/