Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I support other languages using FormFlow?

Tags:

botframework

I built a bot and it's working well, I'm using FormFlow to complete a questionnaire. I need the commands working in Spanish, but it only works in English (help, quit, reset...), except in the emulator.

Using the emulator and changing the Locale to "es" is working: Emulator in Spanish When I type "ayuda", the help is showed. It's ok.

In the Bot profile page, the bot was published in spanish (using "es"): Bot profile in spanish

The bot was published in Skype, Facebook Messenger, Slack and Telegram.

When I use the bot in Android with language in "Estados Unidos - Español" or "España - Español" and type "ayuda" or other command in spanish, the bot answers the input in english with "'Ayuda' is not a [field] option" message, but when the input is "Help" it's working well.

Skype Android in spanish

Is there something I'm missing?

like image 401
dchumpitaz Avatar asked Aug 14 '16 05:08

dchumpitaz


1 Answers

I use ngrok for review the messages exchanged between Emulator and the bot, using the Locale field (with es, es-US, es-PA, es-ES, etc) the messages in spanish is working.

After this, I write a little command in the bot for get the Locale, this field return an empty value ever (with es, en, etc).

Finally, I set the locale in the MessagesController in the Post method.

activity.Locale = "es-US";

The bot is working in spanish like I want.

Is this the best solution?

like image 180
dchumpitaz Avatar answered Oct 18 '22 06:10

dchumpitaz