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

Announcements

News and Announcements icon
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,660 Super User 2026 Season 1 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
Valantis Profile Picture

Valantis 796

#2
Vish WR Profile Picture

Vish WR 335

#3
Haque Profile Picture

Haque 278

Last 30 days Overall leaderboard