Translation editor and TChart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
stundman
Newbie
Newbie
Posts: 6
Joined: Wed Sep 14, 2005 4:00 am
Location: Lyon
Contact:

Translation editor and TChart

Post by stundman » Fri Oct 14, 2005 11:46 am

Hi,

I want ot know if it's possible to use the translation editor of Delphi 2005 with the translation procedures of TeeChartPro. Because when I'm in antoher language the program raise the error "can't find TeeChartPreviewer procedure". That's mean with my TChart I can't use the procedure TChartPreviewer.Execute when I use the english version.

In the other hand, I can perfectly use this printing procedure with my main program (in french).

Thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 14, 2005 2:06 pm

Hi stundman,

TChartEditor screens and constants can be translated doing what is shown in the "All Features\Welcome!\Miscellaneous\Multi-Language" example at the features demo. You'll find that demo at TeeChart's program group. However, TChart methods and properties can not be translated and need to be used on their native syntax. To get it working you should drop a TChartPreviewer component on a form and use the following code:

Code: Select all

procedure TForm1.Button1Click(Sender: TObject);
begin
  ChartPreviewer1.Execute;
end;
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

stundman
Newbie
Newbie
Posts: 6
Joined: Wed Sep 14, 2005 4:00 am
Location: Lyon
Contact:

Translation editor and TChart (bis)

Post by stundman » Mon Oct 17, 2005 11:54 am

Hi,

Thank you for your reply. Actually I knew the procedure to translate the ChartPreviewer function. I want to explain my specific problem.

In my Delphi 2005 project, I've got DFM and PAS files attached with myprogram.exe. And when I use the translation editor of Delphi 2005, after compiling I've got others DFM files attached with myprogram.ENG (for english). So when I change the standard language in windows XP (in the control panel : regional options an language) the program links the English DFM files. After that, when I use the ChartPreviewer1.Execute (as you meant in your previous message), I've got a Exception : "can't find TeeChartPreviewer procedure".
So...
I want to know how I can solve this problem. Because in the main language project (french) it works, but with the english language association it doesn't. And it's the same project !

Regards

stundman
Newbie
Newbie
Posts: 6
Joined: Wed Sep 14, 2005 4:00 am
Location: Lyon
Contact:

Post by stundman » Thu Oct 20, 2005 1:41 pm

Hi again,

I want to explain once again my problem... and I wait for an answer please...

I develop with Delphi 2005. I've got a simple project as below
unit Graphe;

interface

uses

{ system }
Windows, SysUtils, Graphics, Forms, Buttons, Controls, ExtCtrls,
StdCtrls, Classes,
{ steema }
TeePolar, Chart, TeeEdit, TeePageNumTool, TeEngine, TeeTools,
Series, TeeProcs;

type
TForm1 = class(TForm)
ChartPreviewer: TChartPreviewer;
polarChart: TChart;
Indicators: TRadarSeries;
ChartTool1: TPageNumTool;
butPrint: TBitBtn;
butShow: TBitBtn;
procedure butShowClick(Sender: TObject);
procedure butPrintClick(Sender: TObject);

var
Form1: TForm1;

implementation

{$R *.dfm}

// Print
procedure TForm1.butPrintClick(Sender: TObject);
begin
ChartPreviewer.Execute;
end;

// Show indicators between 0 and 100 randomly, with alert and alarm level
procedure TForm1.butShowClick(Sender: TObject);
var
i, number: integer;
lab : string;

begin
Indicators.Clear;
for i := 0 to 6 do
begin
number := Random(100);
lab := 'Indic'+IntToStr(i);
Indicators.Add(number, lab);
if number > 70 then
Indicators.ValueColor := clRed
else
if number > 50 then
Indicators.ValueColor := clYellow
else
Indicators.ValueColor := clGreen;
end;
end;

end.


And I don't use any procedure to translate anything ! So my language in the control panel is French (France). I run the program and it runs perfectly.

Now, I add the english language with Delphi 2005 (Project -> language -> Add) and it's compiling safely. I'm still with french in control panel. I test the program ; it works.

When I switch into the english language in the control panel. I launch the program and it displays the buttons and co into english. But when I click to the print button => Error : can't find "TChartPreview". And the title of the error window says 'steema'.

I've got this little application in a zip, I could send it to you. But I must know if there is a solution ?????

Regards,

Stund

stundman
Newbie
Newbie
Posts: 6
Joined: Wed Sep 14, 2005 4:00 am
Location: Lyon
Contact:

Post by stundman » Thu Oct 20, 2005 3:13 pm

I solved my problem...

In the compilation options (options -> packages) I forgot to check the option : "Build with the execution packages".
Now, I can see the packages used in the application information (project -> information).

I hope my problem will be usefull for the next people...

Bye.

Post Reply