cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TheRobRush
Super User
Super User

Microsoft Translator V2

Trying to test out the translator in Powerapps. Got the old version working fine, but no matter what I use V2 in, text box label etc, it returns this error...

 

"Behavior function in a non-behavior property. You can't use this property to change values elsewhere in the app."

 

If anyone else has had an opportunity to test out the V2 translator and got it working can you share some of the syntax / methods you got it functioning with because as of now it looks to me just to not be working properly yet.

 

Here is the ms doc on the new v2, no code examples like the first one there.

https://docs.microsoft.com/en-us/connectors/translatorv2/

 

Thanks everyone

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Dual Super User
Dual Super User

I just played with it for a while using an old project I had.  The one thing I noticed is that they swapped out the parameter order on the Translate method.  In version 1 is was (Text, Language code).  Now its (Language code, Text).  That may be where your error is coming from.  Here's the formula that works for me.

Set(Var1, MicrosoftTranslatorV2.Translate(Picker.SelectedText.Code,English.Text))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

View solution in original post

3 REPLIES 3
Pstork1
Dual Super User
Dual Super User

I just played with it for a while using an old project I had.  The one thing I noticed is that they swapped out the parameter order on the Translate method.  In version 1 is was (Text, Language code).  Now its (Language code, Text).  That may be where your error is coming from.  Here's the formula that works for me.

Set(Var1, MicrosoftTranslatorV2.Translate(Picker.SelectedText.Code,English.Text))


-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Join me at 365 and PWR EduCon in Chicago
EduCon Chicago 2022

This worked, thanks.
I had reversed the order already, but I am guessing perhaps it was because I had the code directly in a text box.

Changing it to a set var on a button with textbox assigned the var worked perfectly.

_____________________________________________________________________________________
Like my answer? - Hit that Thumbs Up. Resolved the Issue? - Hit Accept as Solution.
This helps others find solutions to future issues!
NightKing
Advocate I
Advocate I

The V1-Connector (Deprecated) i can use in Text-Labels like

 

Text=MicrosoftTranslator.Translate(ThisItem.Titel,"de")

 

The V2-Connector is working only with OnChange/OnSelect-Function and Variables and have a reverse Parameter-Order

 

OnSelect=Set(varTranslatedText,MicrosoftTranslatorV2.Translate("de",ThisItem.Titel)).

Text=varTranslatedText

 

This is annoying, because this behavior prevents from using the V2 in Gallerys or Multiscreens

 

Solved: MicrosoftTranslator: The service returned an error - Power Platform Community

 

Because of the V2-Connector also getting deprecated, when do we get a working MicrosoftTranslatorV3-Connector?

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Top Kudoed Authors
Users online (1,795)