https://discord.gg/botpress logo
Automatic translation without AI
# 🤝help
b
Hi everyone, is there anyway that Botpress Cloud will automatically translate the bot's existing message cards? For example, let's say I have the message card that will display "hello, welcome" to the user. If the user indicates that they speak French, then the message card will now automatically display "bonjour, bienvenue", without me manually changing the message card. My bot is heavily message card-based (there is no freeform, AI-generated responses), so I am hoping to achieve this without AI generating customized messages. But I'm okay with AI helping me translate my message cards. Please let me know if this is a possibility!
l
Enable translator agent from the left -> add a single choice to give language options and based on the langauge choosen by the user, set user.TranslatorAgent.language the language code. i think it is fr for French if (workflow.language === 'عربي') { user.TranslatorAgent.language = 'ar' console.log('User Selection Arabic') } else if (workflow.language === 'हिंदी') { user.TranslatorAgent.language = 'hi' console.log('User Selection Hindi') } else if (workflow.language === '普通话') { user.TranslatorAgent.language = 'zh' console.log('User Selection Mandarin') } else { user.TranslatorAgent.language = 'en' } https://cdn.discordapp.com/attachments/1415780377712263329/1415793942863155260/image.png?ex=68c4805c&is=68c32edc&hm=b500a4f7900077243bbc7a5c17627a090559f334bfef4c46b8f3c2d9aaded519&
b
Thank you so much! I will try this this weekend.