Hi all,
I recently came across a usecase where I have to change localization from a custom menu button rather than from the flow. I'm thinking that this can be handled with transformers but I am not able to implement it myself. If you have some input or if there is a better way to approach this problem, please share with me.
Thank you!
Changing Localization explicitally

Rishabh Goyal
Didn't find what you were looking for?
New postWas this post helpful?
-
Anton Trukhanyonok
Hi Rishabh,
I would try the following approach.
- The button triggers JS code similar to
webchat.sendMessage('', {locale: 'de-DE'}) // A data-only message sent back to the flow and not shown to the user - In the beginning of the flow, a Lookup node will check for input.data.locale and for each possible variant have a Switch Locale node.
If that doesn't work because locale switching should happen anywhere within the flow then you can use an attached flow and a rule intent that fires when input.data.locale is not empty.
Would it work in your case?
Alternatively, you can use a transformer which would translate all back and forth messages between the user and the flow language. We have such a transformer in our repo.1 - The button triggers JS code similar to
-
Rishabh Goyal
Thank you Anton!
0 -
Anton Trukhanyonok
Glad it helped! Let us know if you have more questions
0
Please sign in to leave a comment.
Comments
3 comments