Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
V6s5, Suggestions, Same App in English and French
Message
De
05/01/2004 10:11:45
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00863849
Message ID:
00863861
Vues:
12
This message has been marked as a message which has helped to the initial question of the thread.
Sure, you can change the language on start-up, and even on-the-fly.

I like the approach used by the Opera browser: you can download the installation program in one language (ca. 11 MB), and then download additional language files (about 100 KB for each language). The files are in text-format, like the old INI files. This makes it easy for the end-user to translate to additional languages (say, German, Spanish, or Quechua).

On program startup, you can read data a text-file (DBF is also an obvious option, but I find it pleasant if the user can create complete new language files without special tools!), and assign it to global variables, for instance.

My backup utility, in the download section, shows how to read from a text-file.

You can assign the global variables to form labels, captions, etc., in Form.Init().

Special problems arise in the menu; I think you should generate the menu once, and then do all maintenance in the MPR, which you treat like any other program (and forget about the original menu). That way, you can dynamically change menu texts, status bar messages, and even keyboard assignments.

=======

Buying a ready-built solution, as suggested in another reply, will probably save you some programming work, so you should also consider this option.

>Hi all
>
>I have this proposal to develop an app which works both as English and French.
>
>I do not mind having 2 compilations of the same app, but would like to avoid 2 sources at all costs.
>
>I have heard of localization .h files which contains all the strings in it. So whenever I want to print a string I use the STRINGCONST_LOC kind of line to substitute the string for the given .h file. Am I correct in understanding this?
>
>If the above is the way then how can I tackle menus prompts for this? I use class based menus and the prompt is stored in the class property, how can I assign the constant in a property?
>
>What happens to the framework based messages, if the above is followed?
>
>Can I get the app to switch languages on the fly so the person starting the app can switch between languages as required.
>
>Please advise.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform