Foxcharts. Proposition

Jul 17, 2009 at 11:35 AM

Hi, Cesar!
Just my proposition to locale your Foxcharts.

1. Somewere in ChartSample_New.load method
you can define global variable, say
IF TYPE('gnLanguage')='U'
PUBLIC gnLanguage

2. Add Lang.prg
LPARAMETERS lc1,lc2,lc3,lc4
RETURN EVL(ICASE(gnLanguage=2,lc2,gnLanguage=3,lc3,gnLanguage=4,lc4,.t.,lc1),lc1)

3. In ChartSample_New.Pf's controls that have caption properties
init method can include:
 this.caption=lang('English text', 'Portugese', 'Spanish', 'Russian')
And your Foxcharts becomes International.
I didn't mean you know all languages. Codeplex visitors can help you.
I can fill Russian and Ukraine.
Just fill English part of messages.
IF someone can't find language he need can easaly add it using seek word "lang(".

IF you like this idea I'm sure you can make it better.


Jul 17, 2009 at 11:46 AM

I think this would help be handled with language specific include files.

Jul 17, 2009 at 12:03 PM

It's classic to use include files. But I never like it. We use Russian and Ukraine and I believe my way took me less time.

IMHO, easier is better.

Jul 17, 2009 at 12:08 PM

My second proposion deals with "Circulargauge". I've send it to Cesar.

Hope we'll discuss it later. After Cesar.

Jul 17, 2009 at 12:16 PM


Using #Include files, all the language specific modifications to be made are identified and stored in one place.  Providing for localization merely requires translating all of the text in the file and pointing to the new #Include file.

Changing the code itself is a different matter; first of all, you need to identify all places in the class where translations must be made, and then you must actually modify the code to cause those modifications to take effect.  And, when you download a new version, all of your modifications would be lost.


Jul 17, 2009 at 12:53 PM

Hi Yudin,

Yes, that's indeed a great idea to make the samples and tools international. We just have to decide the best way to make it.

What exactly did you mean in "Circular Gauge" sample ?

Can you contact me directly ?

vfpimagig at hotmail dot com

Best regards