You don't have to rename the controls.
For example, the MBS plugin gives an example for this.
For example, you can make that every control looks for a specific
field in the text file in its open event, such as:
sub MyPushButton.Open
dim s As String
s=app.getLocalizedValue("MyPushButtonCaption")
me.caption=s
end sub
Even if you don't plan to use the MBS plugin, you may download the
documentation to find out how it's done.
Le 27 juin 06 à 04:34 Matin, Mario Buchichio a écrit:
Hi list
I'm trying an attempt to localize my application loading the
control and GUI text from a text file.
Not sure how to do it though...
I mean, is there a better way to do this that iterating through a
Select/Case loop for example checking every line I read from the
text file to find the destination control?
Could I name the controls in the text file and "call" them from
there. Not sure how to explain this...
I mean, I suppose I can only 'name' controls using literals, right?
like:
mainWindow.pushbuton1
What I wish to know if there is a way to 'call' controls without
literals or maybe using variables instead like:
controlName = fileStream.readLine
so that controlName points to the correct contro based on the name
readed form the text file.
I was thinking in loading the text for each control from the text
file line by line and check in a Select/Case for the correspondent
control to assign the text, but soon I realize that that don't look
a very good idea, since I got to maintain two lists: one in the
text file (and one for each language) and "another" in the Select/
Case loop to check against the text file.
Sorry if I don't make much sense, not sure how to explain this ... :(
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>