I would like to put different languajes in the app. Thanks!
That gets very complicated, very quickly.
I have this feature in my apps, where every label, caption, text dialog is associated with tag. The tag, in turn, is associated with a list of captions, in the various languages. If the current setting of the app is to be language #1, then the first caption is used to associated the text to be displayed.
Here is how I do it (in classic, but that should be easily ported in X):
Essentially, each time a caption is required, M_tagcaption is called with the tag that is associated with the text required (be it a text box, a label, a button caption). My global Lang value is set to “[en#” by default, and set to “[fr#” when the language is French. And one of my caption (read at load time from an asset file and saved in a internal database for access) is “[en#Error][fr#Erreur]”. The logic homes into the position of the value of Lang and extracts everything until the first “]” that follows.
The downside is that you need a process to change every captions already displayed, should you want to allow language change on the fly.