How to add translator in thunkable

Hi,

Can anyone guide me on “how to add translator component in thunkable” I have only User Interface components in my components pane.

Thanks
Manimala sethu

2 Likes

Welcome to Thunkable. It seems you are using the DnD version of the designer. In this case the translator would be in the blocks page not the design page.

Here are 2 translation components:

  1. Use Yandex translation component
  2. Use webapi component with google translation api :+1:
  • Google Translation api url: https://translate.google.com/translate_a/single?client=gtx&dt=t&dj=1&ie=UTF-8&sl=auto&tl=<Translated language code>&q=<The text you want to translate >

@mailtomanimala3n7d
sl=auto It means to automatically detect the language! So you don’t need to set the native language yourself (you can set it yourself!)

  1. Get object from Json
  2. The value obtained by the key: “sentences”
  3. The value obtained by the key: 0
  4. The value obtained by the key: “trans”
1 Like
Name Code
Amharic am
Arabic ar
Basque eu
Bengali bn
English (UK) en-GB
Portuguese (Brazil) pt-BR
Bulgarian bg
Catalan ca
Cherokee chr
Croatian hr
Czech cs
Danish da
Dutch nl
English (US) en
Estonian et
Filipino fil
Finnish fi
French fr
German de
Greek el
Gujarati gu
Hebrew iw
Hindi hi
Hungarian hu
Icelandic is
Indonesian id
Italian it
Japanese ja
Kannada kn
Korean ko
Latvian lv
Lithuanian lt
Malay ms
Malayalam ml
Marathi mr
Norwegian no
Polish pl
Portuguese (Portugal) pt-PT
Romanian ro
Russian ru
Serbian sr
Chinese (PRC) zh-CN
Slovak sk
Slovenian sl
Spanish es
Swahili sw
Swedish sv
Tamil ta
Telugu te
Thai th
Chinese (Taiwan) zh-TW
Turkish tr
Urdu ur
Ukrainian uk
Vietnamese vi
Welsh cy

From Languages Codes  |  Directory API  |  Google Developers

1 Like

Thank u so much for your reply. Here is my code.

https://x.thunkable.com/copy/fb6457e16ff9cb7fd3d8119ba136d2be

I am using translator from blocks only but i want to take the language name from list viewer which is bind with my DB

Please have a look into my project link

Thanks
Manimala Sethu.

1 Like

And the problem is with the column values in the DB I guess because in the list viewer it is Spanish but in the translator it is Spanish(es). I guess i need to change my DB columns.

Is there any other version of thunkable available so that i can use the table from Yandex translator without modifying the DB.

2 Likes

Thank u so much will try that and let u know :+1:

1 Like

The Translator uses the short codes not the names. Names are there to be easier for us but the actual translator component will use the code so for Spanish it will uses es and for Greek it will use el.

You will need to have two columns in your table. One to display to users (which has the full name) and one to use in the app (which has the code). This is standard for all translators.

Thank u so much …Will try this and let u know

1 Like

Wow! that’s a great reply i have added a new column to my DB table and it works fine.

I am just working on speech recognizer block. Here is my piece of code.

image

I want it to listen to the speech and convert it to text.

But this doesn’t work. Should I change anything.

Thanks
Manimala

1 Like

This is a new question now. Your post was about translator. I would appreciate if you mark it solved and open a new post for the speech recognizer.

These are two different subjects, If any other member will want to search about speech recognizer, the user will not type translator in the search field.

Sure

1 Like

Hi
I have a question, in my app I have built buttons for the languages on which when clicked the whole app’s text shall be translated to that language. I am not able to translate the whole app’s text to that particular language, is there a way to solve this? This my app: Thunkable

Hi and welcome to Thunkable!

It’s great that you included the project link but when you have dozens of screens, it’s really hard to know what to look for to help you.

Please be specific about where the translation if happening. Also, what do you mean by “the whole app’s text”? Do you want this to be a language switch for all visible text (labels) in the project?

The only way I can think to do that is to loop through all labels in each screen using the Any Component blocks and translate and replace each label’s text. If you’re new to Thunkable, that’s going to feel pretty challenging. It’s not something I can provide quickly in this post.

No, I want there to be a language switch for all the visible and invisible labels. Thank you for your suggestion though.