botframework-sdk icon indicating copy to clipboard operation
botframework-sdk copied to clipboard

[.Net SDK, LUIS] Multilingual Chatbot.

Open gopal300 opened this issue 8 years ago • 9 comments

I have created the Multilingual chatbot using LUIS (where i trained it in Spanish) and Microsoft Translate API. For most of the part it´s working fine but the problem is everytime i insert E-mail address it converts it takes English as the default user language while i would like to proceed in language other than English. Another thing is there isn´t much resources which explains how to use translate API while dealing with Formflow (Prompt class in particular).

Thanks in advance for your help!

image

gopal300 avatar Apr 13 '18 11:04 gopal300

Are you using the .NET or Node SDK?

JasonSowers avatar Apr 13 '18 16:04 JasonSowers

I am using .NET.

gopal300 avatar Apr 16 '18 11:04 gopal300

Any solution or suggestion for the issue ?

gopal300 avatar Apr 17 '18 11:04 gopal300

Can you please share the code related to it so that we can reproduce the issue.

fanidamj-zz avatar Apr 17 '18 21:04 fanidamj-zz

For FormFlow:

namespace LuisBot
{
    public enum TypeRoom
    {
        [Describe("Individual")]
        Individual = 1,
        [Describe("Doble")]
        Doble,
        [Describe("Matrimonial")]
        Matrimonial,
        [Describe("Triple")]
        Triple,
        [Describe("Suite")]
        Suite
    }

    [Serializable]

    public class BookingForm1
    {

        [Prompt("¿Para qué fecha quieres reservar la habitación?")]
        public DateTime Fecha { get; set; }
    
        /*
        [Prompt("¿A qué hora prefieres registrarte? Utiliza el formato HH:mm. \n\n Por ejemplo las 10.30 p.m. serían las 22:30")]
        public DateTime Hora { get; set; }*/

        [Prompt("¿Por cuántas noches quieres reservar la habitación?")]
        public int Noches { get; set; }

        [Prompt("¿Para cuántas personas quieres la habitación?")]
        public int No_Huespedes { get; set; }

        [Prompt("¿Cuántos niños?")]
        public int Niños { get; set; }

        [Describe("Seleccione la opción deseada: ")]
        [Prompt("Que tipo de habitación quiere? {||}")]
        public TypeRoom TipoHabitacion { get; set; }


       

        public static IForm<BookingForm1> BuildForm1()
        {
            
            return new FormBuilder<BookingForm1>()
                
                .Field(nameof(Fecha), validate: ValidateDate)
                //.Field(nameof(Hora), validate: ValidateTime)
                .Field(nameof(Noches), validate: ValidateNights)
                .Field(nameof(No_Huespedes), validate: ValidateNumPeople)
                .Field(nameof(Niños), validate: ValidateKids)
                .Field(nameof(TipoHabitacion))
 
                .Build();
        }

gopal300 avatar Apr 18 '18 11:04 gopal300

I tried to to use Multilingual App toolkit and generated xlf file for 2 languages English and French. Now the problem is when the bot emulator environment is set to Spanish (the formflow is in spanish) it works fine and proceed with the form build but when i change the enviroment to English the prompt dialog doesn´t enter the formflow. git doubt english-1 git doubt english-2 git doubt spanish

gopal300 avatar May 03 '18 11:05 gopal300

Any updates ??

gopal300 avatar May 15 '18 11:05 gopal300

Apologies for the wait, unfortunately we need a bit more context to this before its solvable. Could you provide a minimal version of your bot so we can build it and try it out? In the meanwhile, here is a sample bot that utilizes multiple languages dynamically. It is not using form flow, but it might provide a starting point.

sbuffkin avatar Jun 19 '18 23:06 sbuffkin

Closing for now, but reopen if you want to follow up on this problem

sbuffkin avatar Jul 06 '18 21:07 sbuffkin