The community members are discussing the best strategy to create a bot that works in 3 languages, where the text in the bubbles and inputs needs to be displayed in the user's selected language. The main points are:
- The community members suggest using a "[Function] Base Localization" typebot that contains default localization data and a default language, but the default language must be set in the main bot that calls the "[Function] Base Localization".
- They recommend setting the localization in "specificLocalization" rather than "common localization" in the "[Function] Base Localization" typebot.
- The community members provide an example of how the labels can be structured, with the language-specific text stored in a JSON object. They discuss the most efficient way to access these labels, suggesting the use of a specific key format (e.g., "ASK_NAME_INPUT") to make it easier to parse the JSON object.
There is no explicitly marked answer in the comments, but the community members provide suggestions and guidance on how to approach the problem.
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?
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)
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
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