Page 1 of 1

how to cut off internal TeeChart localization

Posted: Thu Nov 10, 2011 12:53 pm
by 9341442
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

Re: how to cut off internal TeeChart localization

Posted: Thu Nov 10, 2011 4:12 pm
by narcis
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.

Re: how to cut off internal TeeChart localization

Posted: Thu Nov 10, 2011 6:17 pm
by 9341442
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

Re: how to cut off internal TeeChart localization

Posted: Fri Nov 11, 2011 8:05 am
by narcis
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.

Re: how to cut off internal TeeChart localization

Posted: Fri Nov 11, 2011 8:19 am
by 9341442
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?

Re: how to cut off internal TeeChart localization

Posted: Fri Nov 11, 2011 8:30 am
by narcis
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.