I am trying to add multiple languages to my studio flow. 1 - English, 2 - Spanish, 3 - French.
When the user selects the language I am saving the selected lang in {{flow.variables.lang}}
. Based on the selected lang, I then load the respective translations.
I have multiple strings which use values set in the previous widget. I am not understanding how to set these values dynamically.
For Example:
String: "Welcome to Studio flow, we found your information in our system with zip code {{widgets.User_Information.parsed.zipCode}}
"
In the translation file, I have this string set to key "User_Zip_Code".
In the widget "Gather Input on call" I added {{widgets.Translation_Function.parsed.User_Zip_Code}}
in the text to say field. But when the voice reads it out, I expected Twilio would parse the and insert the dynamic value, but it just read it out as is. Is there a way to dynamically insert these flow variables in the string dynamically?
One way I could think of is to call a function and have that function return the string after replacing the values, but for some reason, there are a lot of gaps that I am seeing when the flow moves from one function to another, so I am trying to avoid function calls.
EDIT:
Adding the data shown in the Widget & Flow Properties
"User_Information": {
"status_code": 200,
"content_type": "application/json",
"parsed": {
"zipCode": 201010
},
}
"Translation_Function": {
"status_code": 200,
"content_type": "application/json",
"parsed": {
"User_Zip_Code": "Welcome to Studio flow, we found your information in our system with zip code {{widgets.User_Information.parsed.zipCode}}. Press pound to continue.”
},
}
Thanks in advance