Translations in FeedReader


Even though FeedReader has now gone closed source, I am very interested in the way you handle translations in the FeedReader 3 source code (Delphi 7 as far as I know).

I don't know how you feel about that, or even if you are willing to share anything, but I definitely like your approach (separate UTF-8 encoded XML files, switch language at runtime and reassign all captions/hints/strings (RTTI perhaps?) etc.). I am facing a similar challenge, and this is precisely how I would do it but as always time is precious. I would be really grateful if I could get some examples/code snippets from you on this matter. I hope you can help me on that one, but of course it's up to you.

Anyway, thanks for FeedReader...

problem

ive had the same problem before by the way

but in comments user explains very good how to solve it

oldtimerock

The easyest way; * each

The easyest way;
* each visual comp has uniq tagid

procedure test(const pcomp : tcomponent);
var i : integer;
begin
for i:=0 to pcomp.ComponentCount-1 do
begin
if (pcomp.Components[i].Tag=555) and (pcomp.Components[i] is TLabel) then
TLabel(pcomp.Components[i]).Caption:='test';

test(pcomp.Components[i]);
end;
end;

.................
begin
test(form1);
end;

Ingmar

That's too easy ;-)

Thanks for stopping by and helping me a bit. Are you by the way affiliated to the FeedReader dev team, if you don't mind my asking?

I have the feeling that they use something different in FeedReader 3.
When I look at the translation files (UTF-8 encoded XML), all translated items have ids which sound/look like a hash of some sort (0000D882E53 for the first item) and the components in the FeedReader forms all have tag=0.
It could indicate something more sophisticated behind which I am really interested to hear more about if possible. Just to clarify things, it is something I would like to use for internationalizing/localizing a small application I made a while ago in Delphi 7.

Thanks for your help. Much appreciated.