I want help on language feauter of my app

i have made an app which name is life hacks there i provided many hacks categories like tech, travel , beauty ,and also i add 4 different languages into my app , the only problem is i did not add any logic or codes to add different languages, i just update the data source with multiple languages, here you see
1
i also made new screens for different languages , its very small logic, as you see here
2
i just add new screens for each languages, when the user will select his desired languages ex: spanish, it will be redirect into that scren ( homespanhish)


but for this he have change the languges again and again, its very intiddous, so can you build a logic that will do the same and save it, i mean when the user select spanish , and open app next time , the languages still be spanish pls someone help me as soon

Hi there mate,

I guess what you are trying to achieve need the knowledge of stored variables.
Once set by the user, they will stay saved in the device.

I also suggest you to use Yandex API as translator, so in the future you can implement even more languages (if needed) and it will automatically translate your texts .

Hope it helped, good luck!

i know about stored variable but idont know how i can use this for my app pls can you take a look at my project, and do one of the method to translate my data and if needed you can add language drop down or screen in home page where i can chagne the languages because its being done by me

https://x.thunkable.com/projectPage/654c48ef8523da3b8c113ff4

You need something like this:

image

Make sure you read the Yandex docs to understand how it works with API call.
If you are unsure how to use API calls i suggest you read Web APIs Blocks | Drag and Drop | Thunkable Docs

Otherwise another solution is to manually translate all the texts you have and they will be chosen by the app depending on the user’s preferred language at the beginning (using a stored variable).

Hope it helps

my buttons are in other screen, how they will translaate the whole app (all of the screens), and is yandex api free?"

Here is one of many solutions:

You can set all the texts on your app from the “Open Screen” block. If there are loads of texts (but it’s not your case as i saw in your app) you can also think of adding a loading icon for a few seconds.

So set a “Open Screen” component with the variable of the language the user chose at the beginning.
If varibale = “english”, then set text to “Here is an hack tip for your life”; if variable = “italian”, then set text to “Ecco qui il tuo suggerimento hack”, and so on…

If you are using Yandex you can do the same by call the API (please refer to the previous API tutorial in my last message and Yandex docs).

As far as i remember Yandex is free, but you better check the docs properly.

2 Likes

how to get the api and use it

I’m sure there is a page of documentation somewhere. I usually google “yandex api docs”.

Please if you are not feel comfortable using API calls start from basics from the tutorial video i posted above or follow other solutions as i mentioned in my last message.

If you dont get that sparkle with Yandex, i’m sure there are many others available, you can google “translator API free” or look into the community any similar post (i recall one from @domhnallohanlon with a website full of useful api calls)

Hope it helps,
Good luck!

1 Like

We have this list that is also in our Web API docs of free APIs you can check

1 Like