Sharing variables between screens

I'm trying to create multilingual app.
When you press the language selection button on the first screen, a 2nd screen opens with a greeting in that language.
The app works, but it displays 2 errors at tinydb. How can I fix them?
Maybe you have some ideas for optimising the blocks?

multilanguage.aia (4.4 KB)

Screenshot 2024-02-10 at 18-07-24 MIT App Inventor

Don't initialize a variable with GetValue. You can get the value in Screen.Initialize block.

Anyway, yo can pass the value to the screen2 directly:

or even better, use virtual screens instead of two different screens for that.

multilanguage_copy.aia (3.2 KB)

Thank you but is there any option to do it with 2 screens? For me it is important.

Yes, of course. Here you have an example:

multilanguage_2screens.aia (4.5 KB)

1 Like

Thank you so much!!! :heart_eyes:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.