Support for multiple languages
Support for multiple languages
Hello, We have TeeChart Pro which I understand comes with support for some 25+ languages. We use TeeChart in Delphi 2007 Win VCL.
How can we enable multi-language support for our charts. That is, the chart property pages should display localized strings. I know it is possible to set the language directly on the TChart component by cliking Options and change the language there, but of course I want the chart to be in English if the user selected English as his language and Spanish if the user selected Spanish as his language in Windows.
How can I do this and what files do I need to distribute to make this work?
How can we enable multi-language support for our charts. That is, the chart property pages should display localized strings. I know it is possible to set the language directly on the TChart component by cliking Options and change the language there, but of course I want the chart to be in English if the user selected English as his language and Spanish if the user selected Spanish as his language in Windows.
How can I do this and what files do I need to distribute to make this work?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Frede,
Yes, this is possible. You'll find an example of this at All Features\Welcome!\Miscellaneous\Multi-Language in the new features demo available at TeeChart's program group. You don't need to distribute any specific file for that.
Yes, this is possible. You'll find an example of this at All Features\Welcome!\Miscellaneous\Multi-Language in the new features demo available at TeeChart's program group. You don't need to distribute any specific file for that.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
wow, that was fast!
I have look at the source code for the sample and as I understand it I just need to call the ChangeLanguage procedure to set the language of TeeChart. Will this change the language of any TeeChart control on the current form or do I need to call TranslateControl as well? I only need to translate the chart editor, not anything else.
Also as I understand it I need to use ChangeLanguage on every form that use a TChartEditor, and I cannot set this globally. It would have been great if you could create a registry key or similar that TeeChart could read and set the language accrodingly.
I have look at the source code for the sample and as I understand it I just need to call the ChangeLanguage procedure to set the language of TeeChart. Will this change the language of any TeeChart control on the current form or do I need to call TranslateControl as well? I only need to translate the chart editor, not anything else.
Also as I understand it I need to use ChangeLanguage on every form that use a TChartEditor, and I cannot set this globally. It would have been great if you could create a registry key or similar that TeeChart could read and set the language accrodingly.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Frede,
Actually this can also be done by right-clicking on a chart and choosing Options.
You may also be interested in looking at the Design Options example in the features demo. Go to Search tab and search for ChangeLanguage.
This is not necessary then. Just setting the language you wish to use is enough, for example:I have look at the source code for the sample and as I understand it I just need to call the ChangeLanguage procedure to set the language of TeeChart. Will this change the language of any TeeChart control on the current form or do I need to call TranslateControl as well? I only need to translate the chart editor, not anything else.
Code: Select all
uses TeeCatalan;
procedure TForm1.FormCreate(Sender: TObject);
begin
TeeSetCatalan;
end;
Yes, you can set this in the HKEY_CURRENT_USER\Software\Steema Software\TeeChart Pro\Editor key, changing the value of Language property.Also as I understand it I need to use ChangeLanguage on every form that use a TChartEditor, and I cannot set this globally. It would have been great if you could create a registry key or similar that TeeChart could read and set the language accrodingly.
Actually this can also be done by right-clicking on a chart and choosing Options.
You may also be interested in looking at the Design Options example in the features demo. Go to Search tab and search for ChangeLanguage.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Frede,
Yes, you need to do something like this:
Yes, you need to do something like this:
Code: Select all
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TeeComma, ExtCtrls, TeeProcs, TeEngine, Chart;
type
TForm1 = class(TForm)
Chart1: TChart;
TeeCommander1: TTeeCommander;
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
class procedure ChangeLanguage(ALanguage:Integer);
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
Uses
TeeConst, TeeProCo, { <-- English }
// Languages
TeeSpanish,
TeeGerman,
TeeCatalan,
TeeFrench,
TeeDanish,
TeeDutch,
TeeChinese,
TeeChineseSimp,
TeeBrazil,
TeeSwedish,
TeePortuguese,
TeeRussian,
TeeSlovene,
TeeNorwegian,
TeeJapanese,
TeePolish,
TeeTurkish,
TeeHungarian,
TeeItalian,
TeeArabic,
TeeHebrew,
TeeUkrainian,
TeeKorean,
TeeIndonesian,
TeeGalician,
TeeFinnish,
TeeSlovak,
TeeHellenic,
TeeRomanian,
TeeSerbian,
TeeFarsi,
TeeCzech,
TeeHindi,
TeeUrdu,
// Ask Language editor dialog
TeeTranslate;
procedure TForm1.FormCreate(Sender: TObject);
begin
ChangeLanguage(TeeLanguageRegistry);
end;
class procedure TForm1.ChangeLanguage(ALanguage:Integer);
begin
Case ALanguage of
1: TeeSetBrazil;
2: TeeSetCatalan;
3: TeeSetChineseSimp;
4: TeeSetChinese;
5: TeeSetDanish;
6: TeeSetDutch;
7: TeeSetFrench;
8: TeeSetGerman;
9: TeeSetItalian;
10: TeeSetPortuguese;
11: TeeSetRussian;
12: TeeSetSpanish;
13: TeeSetSwedish;
14: TeeSetNorwegian;
15: TeeSetJapanese;
16: TeeSetPolish;
17: TeeSetSlovene;
18: TeeSetTurkish;
19: TeeSetHungarian;
20: TeeSetGalician;
21: TeeSetArabic;
22: TeeSetHebrew;
23: TeeSetUkrainian;
24: TeeSetKorean;
25: TeeSetIndonesian;
26: TeeSetFinnish;
27: TeeSetSlovak;
28: TeeSetHellenic;
29: TeeSetRomanian;
30: TeeSetSerbian;
31: TeeSetFarsi;
32: TeeSetCzech;
33: TeeSetHindi;
34: TeeSetUrdu;
else
TeeSetEnglish;
end;
end;
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 |
Instructions - How to post in this forum |
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Frede,
Yes, it works too and I don't think there's any inconvenient in doing so. I think it was implemented that way because it was declared in another class.
Yes, it works too and I don't think there's any inconvenient in doing so. I think it was implemented that way because it was declared in another class.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
What about TeeChart in ReportBuilder
Hi again,
A related question. Is it possible to set the language in a similar way when I use TeeChart in ReportBuilder? That is, if I drop a TeeChart component on a report in design view, I'd like the editing chart dialog to be in a specific language. How can I accomplish that?
A related question. Is it possible to set the language in a similar way when I use TeeChart in ReportBuilder? That is, if I drop a TeeChart component on a report in design view, I'd like the editing chart dialog to be in a specific language. How can I accomplish that?
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hello,
I'm afraid you should ask Digital Metaphors (ReportBuilder manufacturers) for that since they are the ones who make the TeeChart wrapper for ReportBuilder.
Thanks in advance.
I'm afraid you should ask Digital Metaphors (ReportBuilder manufacturers) for that since they are the ones who make the TeeChart wrapper for ReportBuilder.
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |