Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multilingual forms
Message
From
06/09/2001 07:41:54
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
06/09/2001 03:02:11
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00552988
Message ID:
00553030
Views:
15
>Hi All,
>
>i try to create an application which can be used in more language.
>my question is which is the better solution.
>1. create a header file for each language, contains the label, message, grid header etc. texts constans, and when the form is loading re-assign the captions.
>2. create a table with a text id, language code, text; and also when the form is loading seek for the appropiate record and change the caption.
>so the question is which solution is the faster, how big will be the compiled exe file if i include the header files into, or if i include the table into the exe file?
>or if you have some better idea, please tell me.
>thank you
>Ivan

I am currently consulting a client about this self-same topic.

The options are run-time or compile-time localization. Which do you want? Run-time localization allows the user to have a single executable, but change languages.

We decided to use run-time localization.

Basically, all language variables are in a text file - adapted from what used to be constants. Example:
; Language file for English
; You may modify the texts on the right, but keep the quotation marks.
; Also, don't delete or modify any variables on the left side.
MSG_WELCOME        = "Hello"
MNU_EDIT           = "&Edit"
...

[END OF FILE]
It is fairly easy to read the text, and create corresponding public variables, on program startup.

Each form has to assign, especially, label captions, on Init().

For a menu, you need to change constants to variables in the MPR file. This means, basically, you can't generate the menu again.

HTH, Hilmar.
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)
Previous
Reply
Map
View

Click here to load this message in the networking platform