Gyorgy Zak

unread,
Aug 3, 2017, 9:24:10 AM8/3/17
to MIT App Inventor Forum
Hi,

I have developed an application, wich is in Hungaian.  Everything is in Hungarian, even the Datapicker, but I would like to change all texts on Datapicker to English.

The question is how can I do that. Is it possible?

Best regards

György

SteveJG

unread,
Aug 3, 2017, 10:47:54 AM8/3/17
to MIT App Inventor Forum
Yes, this is called "localization."  Localization can be accomplished in many ways.  The following example switches between English and German using two methods.






Button5 (the upper button)  makes use of simple programming. The lookup in pairs block could be used instead of the existing code to populate the labels and buttons.

 Button6 makes use of the advanced Any component blocks. 

 Both methods use simple separate lists for English and German.
The example uses two Lists for each component type.  Here are the lists used on the Buttons:

English   German
one         ein
two         zwei
three      drei
four        vier

The lists for the labels are similar but the names of fruits.  Both lists could be added as a csv text file, stored in Media and then read by the File control and converted to Lists using the list from csv row or table blocks.   

Others might post different ways to provide text localization.   These methods are simple.

"to change all texts on Datapicker to English"   you would just substitute the Hungarian string you have on your ListPicker (?) (Elements from string)  to and English string.
or Did you mean to convert  a Date Picker and Dataicker is a typographical error?



Regards,
Steve
Reply all
Reply to author
Forward
0 new messages