Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Translate Class
Message
From
23/09/2002 04:24:40
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Translate Class
Miscellaneous
Thread ID:
00703268
Message ID:
00703268
Views:
53
Hi Dear All
In my VFP programming works, always met some problem in multi-language version design. In order to solve the problem, I've studied all objects of the form elements found the objects need to display the words all have the caption properties. So the translate class for the form item came out.
The usage of this class is define the object name with certain string, which is listed in the language.ini file. For example: the label¡¯s name is LBL_MSG_ERROR, and you can find the item ¡®LBL_MSG_ERROR=Error Code:¡¯, the ¡®Error Code:¡¯ string will display as the caption of the label object while the form executing.
But before that, you need add some codes in form init() method like below and set the default class lib including the class of translate and readINI:
*!********************************************
*!*Form init Method
*!********************************************
DODEFAULT()
This.Translate1.language_ini=This.Combo1.List(1,3)   &&Define the Language File location
This.Translate1.Section="String"                     &&Define the INI Section 
This.Translate1.SetAllProp()                         &&Translate all object items
This.Refresh()
In additional I have use the ReadINI class to read out the INI file information.
The readini class usage references the note in the class.
The attachment is an example of those classes. If you have any question pls contact with by email robin.hoo@263.net
Thanks all the person who have helped me in UniversalThread
sample
Next
Reply
Map
View

Click here to load this message in the networking platform