I got this question recently:
Can I develop a chatbot supporting mainly popular Indian languages and English? If so, how can I do that? We have thought to do using Google translator api or firebase. But I couldn't understand how to do with that? Any other choices do we have?
That's a good question. And as of now, I would say this is very challenging to do.
But if you are keen on doing this, here is a possible approach you can use:
Here are the steps you could follow to set up such a bot:
1 Set up your bot in English
Create your Dialogflow agent the way you normally would
2 Translate the user's message from local language to English
You can use the translate API to do this. Note: this isn't free, you will incur some fees when you do this.
3 Send the translated message to Dialogflow via REST API
After you receive the translated message in English, you will send it to your Dialogflow agent using the REST API
4 Reverse translate the response from Dialogflow
Once the response comes back from Dialogflow's REST API, you will do a reverse translation of the response - that is, translate it from English back to your local language
I tried something similar with a chatbot in a previous article I wrote.
Here are some challenges you will face:
Translation may not be accurate
Sometimes, the translation is not very accurate.
I don't know why the above translation failed, but you can see  that the first sentence is somewhat more grammatically complete than the second and gives Google a higher probability of getting the translation right.
Unfortunately, in this day of mobile phones, most messages are going to be cryptic and grammatically imperfect. So the chances of making translation mistakes are higher.
Spelling of nouns
When people type out nouns in the local language, they may use spellings which are not easily understood during the translation. There are quite a few reasons for this, including the fact that nouns by their nature are simply too ambiguous for translation.
Interestingly, I created the above Tamil sentence by transliteration - meaning I typed it out in English and had Google create the corresponding Tamil script. In other words, the Tamil script is produced by typing a combination of Tamil and English words in the Google transliteration tool itself.
Why does this matter?
Because when you send the translated text to Dialogflow's API, you need to make sure that the correct entity spelling is already in your entity values. This will be quite challenging to do.
I haven't done it myself, but I suppose it is possible there is some systematic way to create additional synonyms for your entity values by doing some kind of phonology analysis.
I think a chatbot like this would make for a nice class project or assignment, but I would not build production bots using this approach at the moment. ....assuming you know Tamil, else just take my word for it 🙂