Mauro Racca

unread,
May 14, 2019, 8:24:00 AM5/14/19
to MIT App Inventor Forum
hello,

I would like to implement different languages in my application.

I have no idea what the most functional way to take is.

use a variable for each label / text / message and value it based on the language seems to me "expensive" ... if I have to add a new language I have to use again ... 50 blocks to define the new texts ...

does it make sense to use a table in a mysql and then once the language is selected read it and enhance the 50 blocks? in this way it seems easier to add a language, since I can manually compile the table on mysql ...

surely there are better performing roads ... and somehow I have to start .... can someone make me take the most convenient route?

Thank you !
 

SteveJG

unread,
May 14, 2019, 9:53:59 AM5/14/19
to MIT App Inventor Forum
This Forum post discusses Localization...what you want to do https://groups.google.com/forum/#!searchin/mitappinventortest/localization$20steve%7Csort:date/mitappinventortest/4ZYEpeElKMQ/kwKkiNSrAgAJ  

The most convenient route is to establish a 'dictionary' for each language ... see the link.  You issue becomes what is the most convenient way to provide language dictionaries.  Rather than something elaborate, I would just provide a List of 'translations' for each language and set the language to point to the appropriate List, then use the List Index to populate your controls, labels etc with the proper translation.  An example is here https://groups.google.com/forum/#!category-topic/mitappinventortest/0lwvBv7o3rE

Is this what you wanted to know?

Regards,
Steve

Peter Mathijssen

unread,
May 14, 2019, 10:02:58 AM5/14/19
to MIT App Inventor Forum

Mauro Racca

unread,
May 14, 2019, 11:02:14 AM5/14/19
to MIT App Inventor Forum
thank you!


seems "expensive" if i want to realize more localization... but is a route...

but is what i have in my mind.

i think i will realize table in MYSQL to download the value when inizalizing screen

seems for be easier to manage each localization.

thank you

Reply all
Reply to author
Forward
0 new messages