Multi-Language App

Hello!

I made an app a while ago with some text in English, but I was wondering if I could make my app multi language. For say, pressing a button could turn all the text on the current screen to Spanish. I looked through some old threads but I couldn't understand.

Welcome Alexander.

yes you can do this. It is called localization. There are several ways to create a multi-language app, notably using Lists or Dictionaries. Some are simple, other ways are a little complex. Try using a List (simple), show us what you tried and if you have issues, someone will provide specific advice.

Localization.aia (6.3 KB)

2 Likes

So after I install the Taifun Tools, what do I do from there?

You don't need Taifun Tools to create your multi-language app however as indicated in the description of the extension, you might use one or both of these Blocks to select the language the app could 'automatically' set the Labels/Buttons to to discover the Android device current language and select the language file you want based on the language codes provided by his tool.

His Country Block returns the country/region code of the current Locale, which should either be the empty string, an uppercase ISO 3166 2-letter code, or a UN M.49 3-digit code.
A Locale object represents a specific geographical, political, or cultural region.

His Language Block returns the language code of the current Locale.
A Locale object represents a specific geographical, political, or cultural region.

as described. It doesn't do anything unless you supply the Block code and use it with a List or Dictionary that supplies the language of the device with the appropriate language from your available 'language' schemes.

So would I be able to create an app where if the user presses a button, say the “Spanish” button, it would translate all of the text (labels, buttons, etc.)?

Yes. :astonished: Did you download the aia posted and see how it works? The example does that for German/English. Modify the example for Spanish.

1 Like

Thanks!

1 Like

Could It be possible to extend this to multiple screens?

Yes depending on whether 'this' refers to a List or Dictionary or Translate method for localization. An easy way is to use virtual screens. If real Screens are necessary, coding becomes more complex. You need to provide the appropriate variables in the Screen.Initialize Block or use a TinyDB to carry the Lists into the new Screen. :cry:

Did you try Alexander? What happened?

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

like people can change it's language to their interest and this settings wants to effect all over the app. Anyway? And please send the upload the full setup screen shot also.

Welcome Jason

Perhaps Multi-Language App - #2 by SteveJG , there are other ways, this is simple. using a dictionary.

2 Likes