cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Silvester_Lee
Regular Visitor

How to connect to Microsoft Translator from Power Apps

I have followed the official document to build a translator in Power App.  First, I created a resource in Azure successfully (Attachment Figure 1).  After that, I try to add a connector "Translator" and copy and paste the key from Azure (Attachment Figure 2).  However, the error occurs.  Anyone can tell me are there any mistakes I have made?  Thanks.

2 ACCEPTED SOLUTIONS

Accepted Solutions
StalinPonnusamy
Community Champion
Community Champion

Hi @Silvester_Lee 

 

Overall UI

StalinPonnusamy_3-1634313422628.png

 

 

1. InputLanguage - Text Control to enter input

2. Combobox to display Languages

Set Items Property to

 

MicrosoftTranslatorV2.Languages()

 

And Set Code and Name as per below for that language combo box

StalinPonnusamy_1-1634312838408.png

 

3. Set OnSelect Property of Translate button to

 

Set(LanguageResponse, MicrosoftTranslatorV2.Translate(LanguageSelector.Selected.Code,InputLanguage.Text))

 

4. Set Text property of Label control to

 

LanguageResponse

 

StalinPonnusamy_2-1634313076614.png

 

Add-on: We can avoid a button too

For easy thing, We can remove the button and Set the OnChange property of the Combo box to

 

Set(LanguageResponse, MicrosoftTranslatorV2.Translate(LanguageSelector.Selected.Code,InputLanguage.Text))

 

 

View solution in original post

Silvester_Lee
Regular Visitor

Dear Stalin,

I have followed your steps and the translator is created successfully.  I really appreciate your efforts!  Thank you so much.

Silvester_Lee_0-1634567308702.png

Now, I can input English and translate it into Chinese.  It is so great!

Thank you again!

Silvester

View solution in original post

14 REPLIES 14
StalinPonnusamy
Community Champion
Community Champion

 Hi @Silvester_Lee 

 

I used translator service which region was East US and never had issues. I see you created it in the Eastasia region. Not sure, the region is the problem.  Can you try to create in a different region or Global region and try?

 

v-bofeng-msft
Community Support
Community Support

Hi @Silvester_Lee :

Please check the number of the Microsoft Translator V2 connections.Only 2 connections can be created per account.

 

vbofengmsft_0-1633931812394.png

I think this link will help you a lot:

Microsoft Translator V2 

Best Regards,

Bof

 

Good point @v-bofeng-msft 

Thank you for your help and it works.  However, the label still cannot display the translation.  The error occurs.  Did I miss any setting in the function?  Thank you.

Silvester_Lee_0-1634120282856.png

 

StalinPonnusamy
Community Champion
Community Champion

Hi @Silvester_Lee 

 

Can you share the error please?

 

There are 3 errors as follows:

Silvester_Lee_0-1634135596296.png

1. The name is invalid and the identification code cannot be recognized;
2. The function 'Translate' has some invalid arguments;
3. The behavior function in the non-behavior attribute, you can't use this attribute to change the value in other places of the application.

StalinPonnusamy
Community Champion
Community Champion

Hi @Silvester_Lee 

 

Let me create my side and let you know.

 

Silvester_Lee
Regular Visitor

Thank you very much.

StalinPonnusamy
Community Champion
Community Champion

Hi @Silvester_Lee 

 

Looks like the Issue with regions and PowerApps. It works well with a console application using the subscription key.

 

Find the Article for the Regions Availability

 

I have my Azure AD in the US and selected eastus2 as a database and not working for me. For Proof of concept, don't need to enter the subscription key

 

StalinPonnusamy_0-1634217033330.png

 

It works fine

StalinPonnusamy_1-1634217105491.png

 

If no subscription key is provided, the shared API key will be used, which comes with built-in throttling limits based on the number of characters that are being translated, specifically 55,000 characters per day and 100 requests per minute.

 

Please create a Microsoft ticket to connect using a subscription key before going to production

 

StalinPonnusamy_2-1634217537666.png

 

 

 

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,846)