I use a two column table in my sample, to keep track of the next component to be updated with the translation results after the translation comes back. Two items are needed to update the next component:
a code to tell me what type of component it is (B = button, L = Label, etc), and
the component block
If you don't know how to build a two column table, read the introductory articles in the FAQ.
You could deal with this with some TinyDB record keeping, to cache all those expensive translations between runs and across screens.
Assume you code your base app with English (en) text in the components.
Keep a TinyDB tag LANGUAGE with value en/fr/ru/es/... for the last requested target language in any screen, default en.
Use a separate TinyDB NameSpace to hold every translation result you get back from the translator in that NameSpace's language.
So namespace es (for Spanish) would have (among other tag/values)
tag / value
OK / Si
Good / Bueno
(that's all my Spanish)
and namespace ru could have
slow / medleno
...
Before requesting any translation of a piece of text, look in that namespace to see if there is a translation on file.
After getting a translation back from the translator, stash the original and translated text under the appropriate language NameSpace.
When switching Screens, run a copy of the translate everything code (customized for that screen) in Screen.Initialize, taking advantage of the TinyDB caches if available.
I did not try. What is interesting is that I am not able to get any of variables to display in the definition of the setText and getText procedures. It just does not seem as though I can initiate a call of the translation functions with screen initialization. I created a list picker to just see if it would replicate what was done on the first screen but nothing. This one really has me scratching my head. I've attached my blocks for the start. I have not finished all of them.
Understand that I need to supply everything and replace the components. When I am constructing the procedure to getText and setText I don't get the variables of type and component.