innFactory / react-native-dialogflow

A React-Native Bridge for the Google Dialogflow (API.AI) SDK
https://innfactory.de/softwareentwicklung/ui-ux/sprachsteuerung-mit-api-ai-in-einer-react-native-app/
MIT License
199 stars 63 forks source link

Multiple languages? #64

Open 24dev opened 5 years ago

24dev commented 5 years ago

Love the library!

I want to add multiple language responses, so that when a user sends a query in a certain language, the response comes back in that language.

Something like:

Dialogflow_V2.setConfiguration(
  'email',
  'privateKey',
  Dialogflow_V2.LANG_ENGLISH_GB || Dialogflow_V2.LANG_SPANISH,
  'projectId',
);

Right now, if a user submits a query in Spanish, the response comes back in English, even if the responses defined in the DialogFlow console are in Spanish.

Thanks!

4gentP commented 3 years ago

Hey I have the same issue. Did u find any solution?

Edit: I created separate functions for each language and put the entire setConfiguration in them and seems to work.