Well, I don't think I was so wrong since the original question didn't
reveal the target RB version (many users still use 5.5 where dynamic
constants don't exist).
Le 27 juin 06 à 14:59 Soir, Ben Blake a écrit:
G'Day,
You don't need to go to all this trouble. RB 2006r1 (though r2 has
some handy fixes) allows build an app that will load these
localized strings depending on your system settings. This is done
via defining a constant as dynamic and setting the control caption
to the constant. Now add all your languages into the constant and
the correct one will be picked up. Oh and there is an RS app called
Lingua which also makes adding/editing all your localisations easier.
cya
Ben
On Tue, 27 Jun 2006, at 21:07:49, Arnaud Nicolet wrote:
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>
_______________________________________________
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>