cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tperry
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
tperry
Frequent Visitor

Set the Combobox default (DefaultSelectedItems) to:

Filter(
    allLanguages,
    Name = "English"
)

 

View solution in original post

5 REPLIES 5

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!

Hi 

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.

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))

tperry
Frequent Visitor

Set the Combobox default (DefaultSelectedItems) to:

Filter(
    allLanguages,
    Name = "English"
)

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (6,181)