[Solved] Yandex translator is not working on every language

I see that it translates the Romanization of Chinese into symbolic Chinese. What I need is for it to translate English words into Chinese… English words like dog, cat, cars, etc. Like a translator. Like how it does for all the other languages. I don’t need it but I’d really like to include Chinese language capability in my app. That is why.

It gives me error in live testing and downloaded apk file. For Android so far. Don’t know about iOS. The error it gives me is… “Invalid parameter: lang”

Seems to be working fine on iOS:

No issues on Thunkable Live for Android:

and installed on Android:

I’m stuck without Chinese for now on my app then…

I’m using a drop down menu to choose the language and all other languages work except CHINESE_CHINA.

I’m at a total loss here…

What information are you expecting to input into the app and what information should the Translator give back to you?

How does this differ from the screenshots I’ve shared above??

The biggest difference is the dropdown menu to select target language. The information being fed into the translator are just random short phrases from a list. All the languages work in the list I compiled from the Yandex list. I tried spelling CHINESE_CHINA differently like CHINESE_CH and just CHINESE to test… and they cause the app to reboot instead of the error. Strange.

Ok, I’m starting to understand you now.

Are you using these blocks?

Something like that, except I’m using a list in the interface so the user can choose the language.

The problem is that the language value in the drop-down list of blocks is different from the one you need to enter when using the variable block. @domhnallohanlon I told the developers about this problem, but they felt that my comments did not cause big problems for users, and this could not be fixed for Column and Row. Now, a similar problem arose with a component of the translator.

Your example clearly shows that the question costing 10 cents turned into a 100$ problem, which several people tried unsuccessfully to solve for several hours.

%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5

When you select Chinese from a block, you need to select CHINESE_CHINA, and when you set the language using a variable, you need to specify the text CHINESE in it.

2 Likes

actech, first, thank you for all of the trouble you went to figure this out for me. I made sure to appreciate all night before I tested this morning to confirm the same results. When I try your code exactly as you have it, it works perfectly. I see you figured out that ENGLISH_US has to be ENGLISH as well this way.

However… when I changed the CHINESE_CHINA in my dropdown menu to CHINESE… (I tried before and kept my fingers crossed and tried again hoping that I only thought I tried it before and really didn’t).

So what happens is… the app crashes and restarts. I don’t see how there can be any difference when “CHINA” is set with a variable block and when “CHINA” is chosen from a list. Do you have any idea??

Do you have exactly the word CHINESE in your list? Perhaps the problem is not with the choice of language, but with something else. If you give me a link to your project in a personal message, then I can see it.

Actech! I couldn’t have figured it out without your help again! So what was causing it to crash was the text-to-speech function when I use “CHINESE” instead of “CHINESE_CHINA”… I was using the same variable for both text-to-speech and translator. So for Chinese, I have to make a special rule for one of them for both to work. Thank you!!!

@actech,but it is stills going wrong.
“Ni Hao” isn’t means “二豪”.
It should translates to “你好”.

Try to tell Translator developers this. I don’t know what Ni Hao is or what 二 豪 is. I don’t even know what 二 and 豪 really mean. :roll_eyes:

“二” means “two”
“豪” means (umm difficult explain in eng)

Thanks for the information.

1 Like

Anyways, we shouldn’t be worried about translating Ni Hao… probably more useful to focus on “Hello”.

AND I wanted to share the same with HAITIAN (CREOLE)… for variable block, it must be “HAITIAN (Creole)” for the Yandex Translator.

PORTUGUESE_BRAZIL is just “PORTUGUESE”

my code correct if yes then why not it is working

It’s possible your code is not correct. Post a screenshot of your blocks.

And what happens when you preview it? What is the value of Label16’s Text before it gets translated and after?