cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

This error pops up for ~20 seconds when I first open the application I have created through the Powerapps app on my mobile.
"MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

 

The error only shows right when the app is opened. I do not have any issues with anything being translated, and there are no issues when in Dev mode. There is no error in the App Checker. 

I have a combobox where the default value is English but the user can choose any of the languages provides though the MicrosoftTranslate connector. My formula on the items being translated is:

If(
lang.Code = "en",
[Translate Text Goes Here],
MicrosoftTranslator.Translate(
[Translate Text Goes Here],
lang.Code
)
)

I am not sure why this error is showing when nothing seems to be wrong.

It seems to be related to this issue which never received a solution. 
https://powerusers.microsoft.com/t5/Building-Power-Apps/The-method-Translate-has-an-invalid-value-fo...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Frequent Visitor

Re: ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

Set the Combobox default (DefaultSelectedItems) to:

Filter(
    allLanguages,
    Name = "English"
)

 

View solution in original post

5 REPLIES 5
Highlighted
Dual Super User III
Dual Super User III

Re: ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

Hi @tperry 

 

What do you have on the "OnStart" property for your app? Is there any situation, where a call is made to the Translator when the app is opened? 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Frequent Visitor

Re: ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

Hi 

Highlighted
Community Support
Community Support

Re: ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

Hi @tperry ,

Could you show me your formula about MicrosoftTranslator.Translate?

I've made a similar test , use "English" in this function will not work.

Please try this:

MicrosoftTranslator.Translate(text that you want to translate,"en")

Here's a doc about this connector for your reference:

https://docs.microsoft.com/en-us/connectors/microsofttranslator/#array-of-language

 

 

Best regards, 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Frequent Visitor

Re: ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

It's a conditional value based on the language the user is selecting in the dropdown. 

If(dd_languages.Selected.Code="en","Text I want to translate",MicrosoftTranslator.Translate("Text I want to translate",dd_languages.Selected.Code))

Highlighted
Frequent Visitor

Re: ERROR: "MicrosoftTranslator.Translate failed: The Method 'Translate' has an invalid value for parameter 'languageTo'"

Set the Combobox default (DefaultSelectedItems) to:

Filter(
    allLanguages,
    Name = "English"
)

 

View solution in original post

Helpful resources

Announcements
Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (3,821)