How to use web component in kodular for translation

How to use it? It has various properties like allow cookies, save response, timeout and URL. I have filled URL with translation web url followed by API key and timeout with 99999. Is this right?

And my blocks are like following, but it doesnt work

1 Like

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select “Download Blocks as Image”. You might want to use an image editor to crop etc. if required. Then post it here in the community.

how does the response content look like? to find it out, you might want to display it in a label…
learn to debug your project… see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools

Taifun

  1. blocks already given
  2. Error - Encoding “hi” is not supported
    however, i have already checked that hindi language is supported by that site

2020-07-28_012235

you did not provide a screenshot how you call that API…
also your screenshot is useless without Do it results and an example of the response content
Taifun

sorry for inconvenience caused
This is for “When spreadsheet1 get column, do”

what exactly are you trying to do?
according to the documentation Documentation | languagelayer API that API can detect the language of a given text and provide the probability of that result.

also you would use the Get method for this…

example API call

http://api.languagelayer.com/detect
? access_key = YOUR_ACCESS_KEY
& query = I%20like%20apples%20%26%20oranges.

it does not look like you are familiar with Do it… read my previous answer and learn that… this is essential… also you still did not provide

Taifun

1 Like
  1. i am trying to translate language from eng to others, which earlier used to work with yandex
  2. here is response content

as already said

that API does NOT translate!

also hi is not a valid value for encoding
https://docs.kodular.io/components/connectivity/web/#post-text-with-encoding

The characters of the text are encoded using the given encoding.

what is character encoding


a valid value would be UTF-8, however this would not help very much in this case, because as mentioed earlier you have to use the Get method there…

Taifun

leaving everything aside, can you give me simple blocks to translate language?

2020-07-29_001546

app interface

Since Yandex stopped free service you can either search for another free service or create translation files yourself

1 Like

i am unable to undestand all this, if i give you app data, would you please do this for me? I am facing this problem since so long, i will really appreciate your support.

1 Like
  1. I have already searched free service and i have its API, but dont know how to use it as people say, it cannot be used with yandex component and i will be required to use web component, but how to do it, nobody knows, nor i found any tutorial on web. A newbie like me, cannot do this.

  2. Creating translation files requires word to word conversion, and it is for those apps, whose textual data is fix, my apps data keep on changing since it is about job postings

If you want to continue with Yandex you have to pay for it. Otherwise forget Yandex and find another service. The above api that you mentioned detects the language used , does not translate see my example below. I have a text in text_box3 written in greek and when I press the button api detects that language used is Greek it doesn’t translate the word.

You were not supposed to take that much tension for me, that you presented everything using blocks.
Probably i am using service wrong way and most probably because of “query”. i have put api key in the url, that is it. I dont know how to put query in it. for that i even asked kodular people to check and let me know if i am missing something, but they did not reply.

Here is the URL for instructions, if you can understand and make me understand, where i committed mistake
https://languagelayer.com/documentation

when situation became worst and when i did not find solution, i was even ready to pay them, but there plans are too much complex, somewhere they mention 5.5$, however, when i checked their plans, they were showing atleast 15$. This amount is too much in front of my app’s earning

as already said

find another API!
Taifun

1 Like