Share feedback, ideas and get community help

D
F
M
a
g

multi-lingual bot

I need to have a bot which works in 3 languages. All the flows are the same only the Bubbles and Inputs need to have text displayed as per the selected language. The user selects his preferred language in the 1st step. What is the best strategy without having to implement 3 bots?
A
W
17 comments
here is the "[Function] Base Localization" typebot i jump into
make sure to enable merge answers
[Function] Base Localization contains default localization data as well as a default language
Attachments
image.png
image.png
however default language must be set in your main bot you are calling the "[Function] Base Localization" from.
Attachment
image.png
you need to set your localization in specificLocalization rather than common localization in "[Function] Base Localization" (i do it because i have a use case that requires me to do it)
Attachment
image.png
thanks for your response, will check and get back
my typebot labels are as follows (sharing a small subset):
{
"lables": {
"what is your name": {
"en": "what is your name",
"de": "wie heißt du",
"fr": "quel est ton nom"
},
"send": {
"en": "send",
"de": "schicken",
"fr": "envoyer"
},
"what is your email": {
"en": "what is your email",
"de": "was ist Ihre E-Mail",
"fr": "quel est ton email"
}
}
}

And the selected language - this i get from the user as the 1st step, so the user selects en, de or fr - one of them
i want to know what is the most efficient way to access the labels on the buttons/inputs/answers etc - ideally i would not want the whole labels variable string to be part of each user
any help and suggestions would be appreciated
This will require you to change how the keys are mentioned and how function parses the key
If you are not a developer it may be hard to do it, also you need to use a specific format for keys example what is your name should be keyed as ASK_NAME_INPUT
Then you can use the key

LABELS.ASK_NAME_INPUT

Then in function separate key by . and then go down the tree of json objects
Or use the bot as is and change the way you label your data
and the labels json, that will be a copy in each user session right? any way to keep that globally, so that we have only 1 copy?
specificLocalization is global since its saved in a variable
And its parsed by the other typebot
Remember data is transferred between typebot if u enable merge answers
Add a reply
Sign up and join the conversation on Discord
Join