0:07
hello everyone in this video we are
0:12
translate chat visitors message for the
0:17
agents if you are using Salesforce
0:20
messaging for inapp and
0:22
web I am making use of lightning Aura
0:26
component and I'm listening lightning
0:29
con session new message so this event
0:32
will be fired whenever a visitor sends a
0:35
message so whenever a visitor sends a
0:38
message this on visitor message method
0:43
here using even. getet param I'm passing
0:46
the content and then I'm getting the
0:49
message so this message will be stored
0:55
message using uh fetch API from Javas
1:01
calling this translation
1:04
API and then I am passing the text which
1:07
was sent it will detect the language it
1:10
will translate it and then it will
1:12
return back in English to
1:14
me and that value is stored in
1:17
translated message variable I am
1:20
displaying the customer message and the
1:25
message since I'm using the fetch API I
1:29
have added the that endpoint in The
1:35
URLs now let's see demo so as an agent
1:46
initiate message as an agent I accepted
1:54
session so this is the automatic
1:58
message so this is sent to
2:01
the visitor so the visitor is sending
2:04
bonjour which is hello in
2:08
French so it will say the customer sent
2:12
a message is boner and the translated
2:16
hello so like this we
2:21
translate the customer message and
2:28
agents this this is not a free uh API I
2:32
we have to use the Au key I have uh
2:35
hidden it since uh it's a paid version
2:39
so if you have a requirement to
2:42
translate you can also try this uh
2:46
API for this lightning Aura component
2:49
code please check the video description
2:51
in the video description I have shared
2:53
my blog post from the Block post you
2:56
should be able to get this sample
2:57
lightning AA component code for your
3:12
helpful thank you for watching