web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Copilot Studio
Suggested Answer

Multilingual copilot

(2) ShareShare
ReportReport
Posted on by 28
Hello,
I am trying to make a multilingual copilot and I already have set up the secondary language localization file and the Generative AI is activate. Is there a way for the copilot to identify the language used in a question and respond accordingly without having to switch the language manually on the test chat? I have tried making questions on the demonstration page, but even if I make a question in english it replies with the main language. Does someone know how to make a Power Px script or variable that helps switch between the two languages? I need to later integrate the copilot in a personalized website, so I want the copilot to be able to identify requests between the two languages automatically if possible. 
Categories:
I have the same question (0)
  • Suggested answer
    Robu1 Profile Picture
    1,459 Super User 2025 Season 2 on at
     
    Thank you for choosing Microsoft Community.
     
    To enable automatic language detection and switching in your multilingual Copilot using Power Px, follow these steps:
     
    1. Enable Multilingual Support – Add secondary languages in Copilot Studio settings.
    2. Create a Variable – Set up UserLanguage as a Text variable.
    3. Write a Power Px Script – Use LanguageDetection(User.Message) to detect and set the language dynamically.
    4. Apply the Script to a Topic – Insert the Power Px action within the Welcome Topic.
    5. Test Language Switching – Send messages in different languages in the Test Chat.
    6. Integrate with Your Website – Embed the Copilot using an iframe or JavaScript SDK.
     
    This ensures seamless language detection without manual switching.
     
    Here are some helpful resources:
     
    If this fixes the issue, please mark as resolved to help others with find it.
     
    Happy to help 
    Robu 1
    SuperUser|Moderator
  • cmora-ss Profile Picture
    28 on at
    Hello @Robu1,
    Thanks for taking the time to respond. I revised the attached resources you sent, but all of them only switch the language via the testing chat option. I see you listed a few steps and I would really appreciate if you could thoroughly explain to me: 
     
    Step 2: I know how to use the variable UserLanguage, but on which topic and node do I set it up as a text variable? Can it be on the conversational boosting topic?
    Step 3: I tried using the LanguageDetection() formula but its says that the function is unknown o is not allowed. Am I doing something wrong?
    Step 4: By adding the Power Px action to the welcome topic, do you mean to add the script within the welcome message node (Properties to send activity) or within the welcome text?
     
    I'd find it extremely helpful if you could explain the steps with as many details as possible alongside images to make it easier to understand.
  • Vonselli Profile Picture
    18 on at
    how about if you just add language detection kind of instructions to your copilot like: 

    "Please recognize the language user is using in every message separately. 
    Always answer in the same language as per the prompt or question is stated. 
    If the user changes the language, please change the answering language accordingly."

    This is working at least in my case.  
  • cmora-ss Profile Picture
    28 on at
    Hello @Vonselli,
    I tried this on one of my copilots and it worked, but it's not as consistent with the other ones. Thanks for the response anyway!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 251 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 201 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 93 Moderator

Last 30 days Overall leaderboard