Language selection screen not opening first time (TinyDB issue)

Hello everyone,
I’m trying to create a language selection screen that should appear only the first time the app is opened.

I’m using TinyDB to store the selected language.
If TinyDB value = empty, the app should open the LanguageScreen.
Otherwise, it should open Screen1 normally.

Here is my logic:

  • On Screen1.Initialize:
    • If TinyDB.GetValue tag “language” valueIfNotThere “” = “”
      → open LanguageScreen
    • else → load my normal Screen1 blocks

But the problem is:
LanguageScreen is not opening on the first launch. Screen1 just loads normally.

I attached the screenshot of my blocks. Can someone check if my logic is wrong or if I’m missing something?

Thank you!

*Screenshot:


You’re not matching the values with the conditions


Though I didn’t create something exactly as your goal but that’s how it should be


This how it must be

:hugs:

2 Likes

Thank you for your attention, unfortunately it was not fixed. I have a recipe app. I want it to pop up this screen when I first open it and ask for the language to be English or Georgian, and for the app to remember this action so that it doesn’t ask the user which language they want. Please help me if you can. I’ve been trying to do this for 3 days and I haven’t been able to.

That’s was supposed to work, make sure after selecting language you’re storing something Named as your get value tag

This supposed to work

Let me know if you archive it

1 Like

Just for accuracy, but yours is perfectly working as well.

2 Likes

RaYzZz, I used this method, it worked, thank you very much. But a new problem has appeared, if I select English, it initially shows the specified screen, but if I restart the application, screen1 immediately turns on, it is in Georgian. That is, if I select Georgian, everything is fine, but if I select English, the next time I turn it on, screen1 turns on in Georgian again, can you help me?

Let’s thank :raising_hands:Ibrahim:raising_hands:, I made a tiny correction :grin:

On Screen1 you will need to have, in the Screen.Initialize event, a procedure that sets all the texts in the corrispective language.

There are several extensions to manage language in an app,


or some time ago I created a guide (it has potential thanks to AI, one of the few times they gave me satisfaction :grin:).

1 Like

Yes, but always screen 1 is the first to open, so I can’t use other screens, I can only add one language to screen 1, I have added Georgian, but I need English on another screen. So when the user selects English, which I haven’t written on screen 1, the application still opens screen 1 as the first action.

Correct, that’s the standard behavior.
You should use Screen1 as a router to redirect to Screen2 (Georgian) or Screen3 (English),

but let me stop you right there!

because this is not the right way to translate an app.
If I understood correctly, you’re creating one screen for each language :scream: but the most optimal approach would be to modify the Text parameter of each component that needs to be translated.

If I make screen 1 a selectable screen where they have to choose a language, after choosing it, it still asks the same question because screen 1 always shows kodular. I’m making a recipe application. I have made 50 screens and filled them in Georgian. I want to add English as well. I thought that I would copy all the screens and write them in English, and then whichever language the user chooses, he would see the recipe screens corresponding to that language.

:scream:

I strongly advise you not to proceed in this way! You can also use just one screen to do this.

If you’ve gone ahead with this approach, I imagine you might need some basics (I know spending hours studying may not be everyone’s aspiration, but this way you would have really saved a lot of time during the development phase).

1 Like

What do you recommend for me to make the app 2 languages? I learned everything on my own, I put a lot of effort into each screen, I have 50 screens, the app size is 25mb, can you help me?

I know, and I’m sorry you didn’t start with an effective method right away :frowning_face_with_open_mouth:
I also learned on my own at the beginning, but then I realized that having some basics makes everything much easier.
(I’m not saying it in a bad way)

I suggest keeping all the recipes in a list or dictionary and then using a pager or virtual screen to display them based on the selected item.

Do you have the recipes divided by categories, or are they simply shown in a list?
Now I’ll try to give you an example as soon as you reply.

I have 5 categories, each category has 10 recipes + a popular dishes category where recipes are mixed together, I also have about us, feedback and exit.

I want to point out that this is a very very very very very simple and quick example based on a dictionary of recipes.
It is only meant to show you how it is possible to do everything with a single screen.

SimpleRecipesApp.aia (44.7 KB)

i cant open this file, how i can open it?

can i add u on facebook? i need some help, if u have some free time

You will always find me here,

If you still have doubts about this topic, feel free to write here.
If the topic is different, open another thread (closing this one if you’ve solved it).
Otherwise, contact me privately, but I would prefer to share the solutions we find with everyone.