Enumerate Languages

I’m looking at the eddies electronics example and see a string table with languages.

If I wanted a list box with each language in it, how would I implement this?

for each language in languages
list1.addrow language

Something like that?

There is no “string table with languages”. These are constants with their translations (so called “dynamic string constants”).

You will need to add the languages manually to the listbox:

List1.AddRow("English") List1.AddRow("German") ...

AFAIK you cannot use “dynamic string constants” to switch the language for the end user. The Xojo framework chooses the language on startup of your application by getting the current language chosen by the user in the system settings.

  • Create a constant
  • Make it string
  • Check the “Dynamic” box that appears
  • In the central pane, click “+” to add a language and/or a platform

You can have different messages depending on system language, but also on platform. Terminology may vary on Mac and Windows. For instance “Preferences” on Mac and “Control Panels” on Windows.

Then for instance in a button caption field of the IDE, enter #myCaption (name of the constant preceded by #), and it will automagically display the proper text.

See here for even more in-depth information about App Localization