Hi guys, I think I am drowning in a glass of water…
I have an app with 4 screens, one for the language selector (three buttons) and the rest are webviewers pointing to an url for each language. The app doesn´t translate, just points to screens already translated.
I want my app to remember the user choice, and take him to that screen next time the app is opened
I have seen many tutorials, but so far I am not getting things to work (I am a bit under pressure on this project, maybe this pressure is not letting me see things clearly)
Could you guys please point me in some direction or see if I am on the right/wrong path? I am a bit worried I might not meet the deadline
Thank you so much in advance for any help… Best wishes!
First of all, Welcome to the community.
Second, you’re definitely on the right track. If I were doing that, I would make only one screen, and use the YandexTranslate component to translate.
Something like when “ES” click → TinyDB store value → Open screen “Screen2” with StartValue “ES”
When Screen2 Init → open, get start value → Store in another TinyDB → Then translate all needed components
Keep up the Good Work
Thanks so much for your warm welcome and your fast reply, I trouly appreciate it.
I have been around here for some time, but always finding solutions already posted, tutorials, etc… but this time I have a mean deadline and my boss is starting to loose his nerves… and so am I lol
So thank you for your answer…
I understand Yandex would have been a good solution, however, since we are on the run, I made the (maybe not smartest) choice of going with pretranslated screens.
I realized my code was working after your message, I decided to try it with an apk install. ¿ ? Yet, I am not sure what was going on.
Maybe tinydb was not working in preview mode using companion… No idea, not aproblem now. lol
I hope to keeo the good news on this project… right now I feel grateful not only for the technical help but also knowing that I can rely on this community when needed. Hope I can give back something!
Since we are on the same topic… I am now having trouble when trying to go back to the 1st screen lol
Since tinydb has been written, now it jumps back to the screen
Shouldn´t this resolve the issue?
Sure, what is the error that is being given when you try to go back?
exaltacionv3.aia (2.1 MB) Not really an error… I will share the aia, it will explain itself better than I can
On the main screen user selects spanish, french or english.
Tinydb stoores value depending on language, and sends the user to ES, FR, or EN screen
On each ES, FR, or EN screen, I have a Language button, that should erase the database and let the user choose the main screen again… but looks like it´s not clearing the db
These are all assumptions since I am far from knowing what I am really doing lol
Thanks so much for any help
exaltacionv3.aia (2.1 MB)
What I am seeing is this:
When the screen starts, it gets the Language TinyDB value, and regardless of what the value is, opens the “ES” screen.
It should be:
What this does is:
- Starts a local variable with value of TinyDB
- Checks if there is anything stored inside of the TinyDB
- If Yes: Get the value of TinyDB (stored in local variable called “language”) and opens the respective screen
- If No: It just does nothing
I hope this helps!
THANK YOU MY FRIEND!! You have no idea the pressure you just took from me… It did help, a lot, not only on the technical side, but also with my mental health! It might sound exagerated or funny, but I need to keep my deadline for this project, If I don´t, it could be very bad for me. Being stuck with this was driving me crazy, not only for the technical part, maybe with enough time I could have solved it myself… but the risk of not meeting my deadline was something playing in my head. And the consequences of not meeting the deadline this time + the situation and country is unaffordable.
Thank you verry much GeoBadge, might have been 5 min for you, but really changed my day
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.