4

My team and I are building a bot for Facebook Messenger using Dialogflow, but since our users don't speak the same language (Spanish is the default language in the project), we want to implement an English version of our project, but here's the issue we have implemented both languages as explained in Dialogflow's documentation (Gear - Languages - Select additional languages in the console), but we can't get a response in a language different from Spanish, even disabling ML for all of our intents or talking to our bot in English and languageCode key in JSON response from the server is always "es", no matter what. Here's the question, how can we achieve interaction with our users in both or even more languages dynamically? Any ideas?

Thanks in advance.

Tilek
  • 636
  • 1
  • 8
  • 14
  • I missed that you are using Facebook messenger. Perhaps tagging the question with a label for that will draw someone with experience in that area. I presume you have tried using a Facebook account that is English speaking? Have you tried something like this: https://www.google.com/search?q=facebook+change+language+to+english – Mark Scheel Jul 05 '18 at 17:29
  • 2
    Thanks for answering! and yes, I've used Facebook account in both languages and nothing changed at all – Daniel Vasquez Jul 05 '18 at 17:31
  • Does it work in English in the simulator if you switch the language drop-down? – Mark Scheel Jul 05 '18 at 17:32
  • Do you mean in the DialogFlow's console? Yeah, it does the job smoothly but when trying on messenger it keeps in Spanish – Daniel Vasquez Jul 05 '18 at 17:37
  • 1
    I have the same problem. You cannot set Russian as default so I set English as primary and Russian as secondary. English version works, but Russian intents don't trigger even if I change my Facebook settings to Russian language. – Tilek Nov 23 '18 at 07:27

1 Answers1

1

Each user will have their own language set on the hardware they are using, so I am not sure what you mean by dynamically, but if you want to test English and can't get it not to be in Spanish, just test on the simulator where you can set the language with a dropdown. Go to the Actions on Google console. On the left, under Test, click Simulator. Here is what the language dropdown looks like.

enter image description here

I hope that helps. If it does not answer your question perhaps be more specific about what you are testing on (Simulator, Android, iPhone, Google Home, etc).

Mark Scheel
  • 2,963
  • 1
  • 20
  • 23
  • Thanks, Mark. I think I have the same problem. I am testing DialogFlow integration with Facebook Messenger across all Messenger platforms (specifically - Android, iPhone, and the web). Is there a way to avoid using Action on Google to test DialogFlow in different languages outside default DialogFlow interface on https://console.dialogflow.com? – Tilek Nov 23 '18 at 07:38
  • I tried Web Demo version via bot.dialogflow.com and non-default language responses don't trigger there either. They *do* trigger on console.dialogflow.com. – Tilek Nov 23 '18 at 07:41
  • It works on console.dialogflow.com but not with Facebook messenger, no matter what language you select on Facebook, Dialogflow languageCode is always the default language you selected for the bot. What can I do to detect the language of Facebook user? – madan Jun 08 '20 at 04:26
  • This is currently an active issue in Dialogflow https://issuetracker.google.com/issues/141854194 – madan Jun 08 '20 at 05:36