# How to translate language from clicking from a list viewer?

**URL:** https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192
**Category:** Questions about Thunkable X
**Tags:** beginner, translate
**Created:** [January 4, 2022, 9:34am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192 "2022-01-04T09:34:32Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 4, 2022, 9:34am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/1 "2022-01-04T09:34:32Z")

</div>

How do you translate the language from clicking from a list viewer?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 4, 2022, 9:39am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/2 "2022-01-04T09:39:19Z")

</div>

Can you explain more clearly or give more details?

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 4, 2022, 9:42am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/3 "2022-01-04T09:42:51Z")

</div>

So when the user clicks the list viewer item, it sets the language so users can translate from that language.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 4, 2022, 9:50am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/4 "2022-01-04T09:50:04Z")

</div>

See this demo project  
[https://x.thunkable.com/projectPage/60a013d7aed6ad0012a487bf](https://x.thunkable.com/projectPage/60a013d7aed6ad0012a487bf)

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 4, 2022, 9:56am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/5 "2022-01-04T09:56:32Z")

</div>

Thanks @muneer but don’t really get what’s happening here.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 4, 2022, 11:04am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/6 "2022-01-04T11:04:31Z")

</div>

Tell me which part you want me to explain and I’ll try my best to make it clearer.

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 4, 2022, 12:08pm UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/7 "2022-01-04T12:08:47Z")

</div>

How does the objects and the list things work? I’m a noob, so I don’t know much.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 4, 2022, 12:40pm UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/8 "2022-01-04T12:40:18Z")

</div>

This block of the code is to make the list of available languages and once the user selects one the list becomes only the selected language

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/0/00894844d15154cafecf9d108aeb8fcb48c95d27.png)

The `InitializeLang` function is to create the objects of all components that I want to have difference languages for and for each component it gives the the text is different languages.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/d/3d9697ef8b4a5b4b669bbd6116c6d5c317b3fcff.png)

Whenever the user selects another language from the list the function `changeLang` changes the text in the components to the text of the selected language.

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/b/a/baba9d6e602b32c0f59e58ba856906f8f7cf7dc6.png)

This part of the object will store the selected language so that the next time the user uses the app it opens with the lastly selected language.  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/6/3/6314f330d53c7b316df691e2aaee96f5cd7fb5d5.png)

The object is a `stored variable` so it will be stored on the user’s phone and will not be deleted when the app is closed.

Hope this makes it clear.

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 5, 2022, 3:57am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/9 "2022-01-05T03:57:54Z")

</div>

WOW! Thanks a lot @muneer.

Hope you don’t mind me asking more questions.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 5, 2022, 4:14am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/10 "2022-01-05T04:14:58Z")

</div>

> [@ant\_1](#):
>
> asking more questions

Ask whatever you want and I’ll try to answer whatever I know.

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 5, 2022, 4:27am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/11 "2022-01-05T04:27:17Z")

</div>

Thanks

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 5, 2022, 6:32am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/12 "2022-01-05T06:32:45Z")

</div>

Hi @muneer,  
What is the difference between set property and create object?

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 5, 2022, 8:46am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/13 "2022-01-05T08:46:48Z")

</div>

The `create object` is used to create/construct a new object from scratch and assign keys (properties) to the object and optionally assign values to the properties.

The created object can then be saved as `stored variable` or in a table or in Firebase.

When it is the time to change the value of any property in the object you will use `set property`. Which is used for existing object to change/update the value of certain properties inside the object.

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 5, 2022, 9:17am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/14 "2022-01-05T09:17:31Z")

</div>

Thanks

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 5, 2022, 9:22am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/15 "2022-01-05T09:22:02Z")

</div>

@muneer, what does this do?(from my project)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/6/c6c4bdf3ac83826ea50ad7d14e2106ee57305940.jpeg)

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 5, 2022, 9:23am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/16 "2022-01-05T09:23:11Z")

</div>

I was just testing

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 5, 2022, 10:06am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/17 "2022-01-05T10:06:30Z")

</div>

> [@ant\_1](#):
>
> what does this do?

Not much.

When you select any item from the list this block will run and do the following:  
If the variable `Language` is not yet assigned then it will create an object and assign it to the variable  
Otherwise it will do nothing.

Please note that for the object to be created the first time you need to initialize the variable `Language` and assign it **null**.

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 6, 2022, 4:04am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/18 "2022-01-06T04:04:48Z")

</div>

Oh ok. Thanks.

---

<div class="post-metadata">

### Author: ![ant\_1](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ant_1/32/183393_2.png) [@ant\_1](https://community.thunkable.com/u/ant_1)
#### Post date: [January 6, 2022, 4:42am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/19 "2022-01-06T04:42:37Z")

</div>

But how do I make it function.

---

<div class="post-metadata">

### Author: ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)
#### Post date: [January 6, 2022, 7:31am UTC](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192/20 "2022-01-06T07:31:10Z")

</div>

Please explain better what you want so I can suggest you what to do.

[Next page](https://community.thunkable.com/t/how-to-translate-language-from-clicking-from-a-list-viewer/1665192.md?page=2)
