Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
V6s5, Suggestions, Same App in English and French
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00863849
Message ID:
00864647
Vues:
27
>Just got this idea. Can the English text contained in a property label.caption itself be the lookup maybe with a ==?

What martin just trold you is correct. It is basically the way INTL also works with a field for keyword (actually a phrase as you can put the text in your label) and then a column for each language. If nothing is defined for a particular record for a particular language, it defaults to English (or whatever you want).

Of course INTL does much more than that, adding support for Menus, Reports, MessageBox() replacement, and other localization issues such as currency rates, etc.

For your objects (labels, commandbox, etc.) instead of hardcoding the caption in the properties sheet you set it in Init() or some other custom method in your base framework, called from the Init() of each object:
This.Caption = MyTranslationRoutine("this is the caption")
At runtime, this code will go to the translation table and return the value in the column for the desired language for this user. You have to make sure the label or cmdBox is wide enough for the longest translation as some languages are more verbose than others.

If you make this a separate method from Init(), as mentioned above, you could call it from a setup menu option or setup button and have the app translate to another language on the fly. It makes for impressive demos!

HTH


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform