Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Ideas on multi-lingual controls.
Message
From
23/10/2000 21:06:36
 
 
To
23/10/2000 19:52:06
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00433249
Message ID:
00433265
Views:
15
I will encourage you to take a look at INTL (http://www.stevenblack.com/intlmain.asp)

HTH
>I have an app where you can interactively change the language of the interface by selecting the it from a menu item. For example, if the language is currently English and you select Spanish, all labels, captions, and headers change to their Spanish equilivant. I've even managed to have the items of lookups in combos and listboxes change dynamically.
>
>I have now been asked to do is extend this to the input text in text and edit boxes. Obviously I will have to double up on those fields in the corrisponding tables and someone will be responsible for input the information in the various languages.
>
>What I am trying to figure out is the best way to implement a multi-lingual Text/EditBox class to handle this. Presently, when you select a new language, language, font, and fontsize properties for that language are set in the oLang Language Object. The object then calls each open form to update its interface. (so far all languages I've dealt with use either roman characters or have a TTF so I don't deal with code pages)
>
>One idea I had was to create a 2 dimensional array property in the editbox with the language name as the first column and the corresponding table field in the second. In the control init, the array would be defined.
>
>Dimension This.aLang[3,2]
>
>This.aLang[1,1]="ENGLISH"
>This.aLang[1,2]="SomeTable.Memo1"
>This.aLang[2,1]="SPANISH"
>This.aLang[2,2]="SomeTable.Memo1_Sp"
>This.aLang[3,1]="FRENCH"
>This.aLang[1,3]="SomeTable.Memo1_Fr"
>
>In the refresh of the control, the current language would be searched for in This.aLang, and the corrisponding field would be assigned to This.ControlSource.
>
>An other option would be to require that multi-lingual field names end with "_language", so in this case it would be:
>
>SomeTable.Memo1_ENGLISH, SomeTable.Memo1_SPANISH, SomeTable.Memo1_FRENCH,
>
>and in the refresh
>
>This.ControlSource=Eval("SomeTable.Memo1_"+oLang.Language)
>
>Any thoughts, comments or ideas would be appreciated.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform