Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Localizing application
Message
 
 
To
06/01/2007 11:42:50
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01182888
Message ID:
01183177
Views:
27
>
>I would use one of the following two approaches, to store the texts in several languages:
>
>1) Keep the texts for several languages in several fields in a table. The advantage of this method is that you can see the translations side by side, fairly easy.
>
>2) Keep the data in a text file, similar to an INI file:
>
>
>; Optional comments are preceded by a semicolon
>Variable = Value
>Variable2 = Value2
>...
>
>
>The advantage in this case is that the user can easily adapt the application to additional languages - with a plain text editor. (The Opera browser uses this approach.)
>
>In either case, the captions should be set when the form starts, for instance, in Form.Init(). You might also consider having some property for each Label (the key to look up the caption), which the form then checks, to set the Label caption - or, instead of the form, each individual label.

I am actually implementing the storage approach similar to what you are suggesting: I am using an XML (which is a plain text) file.

But as far as when to set the caption, I do it in the INIT of the label. And I decided on having a class library with a bunch of label classes, one of each key field of the application. Then I drag/place the labels from this library on various forms. Therefore, if I have a label, say "Project", and it is used on many forms, I don't have to set the code in the INIT of this label of each form.

Thank you for your input.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform