how to cut off internal TeeChart localization

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Mike
Newbie
Newbie
Posts: 6
Joined: Tue Mar 29, 2005 5:00 am

how to cut off internal TeeChart localization

Post by Mike » Thu Nov 10, 2011 12:53 pm

Hello,

I need to disable internal TeeChart localization.

It is because we want to use only one localization tool for whole our program. We have choosed LINGOBIT localizer (see www.lingobit.com). This localizer (and also most of all localizers) works like PE exe file structure parser and then generates localized resource dlls. It can translate forms and its componets and also resourcestrings. Then it generates for example:
- program.exe
- program.EN
- program.DE
... then you are able to switch between localization by editing registry HKEY_CURRENT_USER\Software\Borland\Locales.

Is it possible to localize TeeChart components using this technique?
(I have tried to do it using LINGOBIT and it doesn't work).

Have you got any exprience with translating programs containing TeeChart components using this technique?

Best Regards
Jindrich Pastorek

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

Re: how to cut off internal TeeChart localization

Post by Narcís » Thu Nov 10, 2011 4:12 pm

Hi Jindrich,

I'm sorry but we don't have experience using such tools. TeeChart uses its own translation mechanism and resource files. TeChart uses consants for most text, those constants are in each language resource files and their value for each language is being used based on users language selection. I'm afraid those tools may not be able to resolve TeeChart constant definitions or TeeChart constants may override Lingobit's translation. Could you please confirm that's how Lingobit works?

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
Image Image Image Image Image Image
Instructions - How to post in this forum

Mike
Newbie
Newbie
Posts: 6
Joined: Tue Mar 29, 2005 5:00 am

Re: how to cut off internal TeeChart localization

Post by Mike » Thu Nov 10, 2011 6:17 pm

Yes, that's it, TeeChart will override Lingobit's translation

For translation of forms:
Lingobit will translate texts on buttons, labels, etc.. () But then, when TeeTranslate.TeeTranslateAControl is called (after TeeLanguage list is set by call of TeeCzech.TeeSetCzech of course), then all forms elements are re-translated by TeeChart translation system :-(.

For translation of constants:
Without any changes it is not possible for lingobit, because they are stored in var section in TeeConst unit. Lingobit can translate resource strings. See delphi help for "resourcestring" - that's it how lingobit do translation.


My suggestion how to make lingobit translation master and only one is:

1)
- never call Tee<language>.TeeSet<language> (i.e: TeeCzech.TeeSetCzech)
- in unit TeeConst chagne all TeeMsg_.. from var to resource string
.. I guess this would lead to big change of your code (resourcestings are like constant -> it is unable to change it)

2)
- create new unit TeeLingobit (alike to TeeCzech..) (suggestion bellow):
- then call TeeSetLingobit before opening chart.

------------------------------------------------------------
unit TeeLingobit;

interface

Uses Classes;

Procedure TeeSetLingobit;

resourcestring
RS_TeeMsg_Copyright :='© 1995-2006 by Steema Software';
..

implementation

uses TeeConst, TeeProCo;

Procedure TeeSetLingobit;
begin
TeeLanguage:=nil;
TeeMsg_Copyright := RS_TeeMsg_Copyright;
end;

end.
------------------------------------------------------------

Do you think that 1) or 2) would be possible? I would prefer to revert TeeMsg___ to resourcestring.

Are there any other units with texts for translation except TeeConts and TeeProCo?

Best Regards
Jindrich Pastorek

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

Re: how to cut off internal TeeChart localization

Post by Narcís » Fri Nov 11, 2011 8:05 am

Hi Jindrich,
Do you think that 1) or 2) would be possible? I would prefer to revert TeeMsg___ to resourcestring.
I can not confirm that at this stage but I'll add your request to the wish-list to be considered for inclusion in future releases. In the meantime, the easiest solution I can think of is being a source-code customer and removing the control translating calls so that Lingobit translations are not overriden.
Are there any other units with texts for translation except TeeConts and TeeProCo?
No, those two units contain English constants.
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

Mike
Newbie
Newbie
Posts: 6
Joined: Tue Mar 29, 2005 5:00 am

Re: how to cut off internal TeeChart localization

Post by Mike » Fri Nov 11, 2011 8:19 am

I've found another units like TeeConst and TeeProCo:

TeeChartOfficeConstants, TeeOfficeConstants

Are these units another containing English constants?

..I take the job on charts from my collegue who will be long time out of office and I don't have much experiences with TeeChart. Maybe these units are from some older version? Or what are they for?

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

Re: how to cut off internal TeeChart localization

Post by Narcís » Fri Nov 11, 2011 8:30 am

Hi Mike,
Mike wrote:Are these units another containing English constants?
No, those constants are for TeeChartOffice demo project only, not for the charting components.
Narcís wrote:I'll add your request to the wish-list to be considered for inclusion in future releases.
This is TV52015827.
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

Post Reply